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 | |
|---|---|---|---|
| bool | bIsDirty | Grass data was updated but not saved yet. | |
| 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 | |
|---|---|---|---|
FLandscapeComponentGrassData
(
ULandscapeComponent* Component |
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 : | |
| 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, |
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) |