Navigation
API > API/Runtime > API/Runtime/Landscape
References
| Module | Landscape |
| Header | /Engine/Source/Runtime/Landscape/Classes/LandscapeComponent.h |
| Include | #include "LandscapeComponent.h" |
Syntax
struct FLandscapeComponentGrassData
Variables
| Type | Name | Description | |
|---|---|---|---|
| uint32 | GenerationHash | Variable used to detect when grass data needs to be regenerated: | |
| TMap< int32, TArray< uint16 > > | HeightMipData | Height data for LODs 1+, keyed on LOD index. | |
| TArray< uint8 > | HeightWeightData | ||
| int32 | NumElements | Elements per contiguous array: for validation and also to indicate whether the grass data is valid (NumElements >= 0, meaning 0 elements is valid but the grass data is all zero and therefore empty) or not known yet (== UnknownNumElements) | |
| TMap< TObjectPtr< ULandscapeGrassType >, int32 > | WeightOffsets | Serialized in one block to prevent Slack waste. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| PRAGMA_DISABLE_DEPRECATION_WARNINGS | Note: We need to explicitly disable warnings on these constructors/operators for clang to be happy with deprecated variables. | ||
FLandscapeComponentGrassData
(
ULandscapeComponent* Component |
|||
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Check whether we can discard any data not needed with current scalability settings. | ||
| bool | Contains
(
ULandscapeGrassType* GrassType |
||
| SIZE_T | |||
| TArrayView< uint16 > | |||
| TArrayView< uint8 > | GetWeightData
(
const ULandscapeGrassType* GrassType |
||
| bool | HasData () |
Returns whether the data is completely empty (e.g. all-zero weightmap data). Returns false if the data just wasn't computed yet : | |
| PRAGMA_ENABLE_DEPRECATION_WARNINGS bool | HasValidData () |
Returns whether grass data has been computed (or serialized) yet. Returns true even if the data is completely empty (e.g. all-zero weightmap data) | |
| bool | |||
| void | InitializeFrom
(
const TArray< uint16 >& HeightData, |
||
| void | InitializeFrom
(
IBuffer2DView< uint16 >* HeightData, |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FLandscapeComponentGrassData & | operator=
(
const FLandscapeComponentGrassData& |
||
| FLandscapeComponentGrassData & |
Constants
| Name | Description |
|---|---|
| UnknownNumElements |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< FGuid, TInlineAllocator< 2 > > | MaterialStateIds_DEPRECATED | Guid per material instance in the hierarchy between the assigned landscape material (instance) and the root UMaterial used to detect changes to material instance parameters or the root material that could affect the grass maps | |
| FQuat | RotationForWPO_DEPRECATED | Cached component rotation when material world-position-offset is used, as this will affect the direction of world-position-offset deformation (included in the HeightData below) |