Navigation
API > API/Runtime > API/Runtime/Landscape
| Name | FLandscapeComponentGrassData |
| Type | struct |
| Header File | /Engine/Source/Runtime/Landscape/Classes/LandscapeComponent.h |
| Include Path | #include "LandscapeComponent.h" |
Syntax
struct FLandscapeComponentGrassData
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| LandscapeComponent.h | |||
PRAGMA_DISABLE_DEPRECATION_WARNINGS FLandscapeComponentGrassData () |
Note: We need to explicitly disable warnings on these constructors/operators for clang to be happy with deprecated variables. | LandscapeComponent.h | |
FLandscapeComponentGrassData
(
ULandscapeComponent* Component |
LandscapeComponent.h | ||
| LandscapeComponent.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FLandscapeComponentGrassData() |
LandscapeComponent.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| UnknownNumElements | int32 | LandscapeComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| GenerationHash | uint32 | Variable used to detect when grass data needs to be regenerated: | LandscapeComponent.h | |
| HeightMipData | TMap< int32, TArray< uint16 > > | Height data for LODs 1+, keyed on LOD index. | LandscapeComponent.h | |
| HeightWeightData | TArray< uint8 > | LandscapeComponent.h | ||
| NumElements | int32 | 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) | LandscapeComponent.h | |
| WeightOffsets | TMap< TObjectPtr< ULandscapeGrassType >, int32 > | Serialized in one block to prevent Slack waste. | LandscapeComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ConditionalDiscardDataOnLoad() |
Check whether we can discard any data not needed with current scalability settings. | LandscapeComponent.h | |
bool Contains
(
ULandscapeGrassType* GrassType |
LandscapeComponent.h | ||
SIZE_T GetAllocatedSize() |
LandscapeComponent.h | ||
TArrayView< uint16 > GetHeightData() |
LandscapeComponent.h | ||
TArrayView< uint8 > GetWeightData
(
const ULandscapeGrassType* GrassType |
LandscapeComponent.h | ||
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 : | LandscapeComponent.h | |
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) | LandscapeComponent.h | |
bool HasWeightData() |
LandscapeComponent.h | ||
void InitializeFrom
(
const TArray< uint16 >& HeightData, |
LandscapeComponent.h | ||
void InitializeFrom
(
IBuffer2DView< uint16 >* HeightData, |
LandscapeComponent.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| LandscapeComponent.h | |||
| LandscapeComponent.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| MaterialStateIds_DEPRECATED | TArray< FGuid, TInlineAllocator< 2 > > | 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 | LandscapeComponent.h | |
| RotationForWPO_DEPRECATED | FQuat | 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) | LandscapeComponent.h |