FLandscapeComponentGrassData

Choose your operating system:

Windows

macOS

Linux

References

Module

Landscape

Header

/Engine/Source/Runtime/Landscape/Classes/LandscapeComponent.h

Include

#include "LandscapeComponent.h"

Syntax

struct FLandscapeComponentGrassData

Variables

Name Description

Public variable

bool

 

bIsDirty

Grass data was updated but not saved yet.

Public variable

TMap< int32, TA...

 

HeightMipData

Height data for LODs 1+, keyed on LOD index.

Public variable

TArray< uint8 >

 

HeightWeightData

Public variable

TArray< FGuid, ...

 

MaterialStateIds

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

Public variable

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)

Public variable

FQuat

 

RotationForWPO

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)

Public variable

TMap< ULandscap...

 

WeightOffsets

Serialized in one block to prevent Slack waste.

Constructors

Functions

Name Description

Public function

void

 

ConditionalDiscardDataOnLoad()

Check whether we can discard any data not needed with current scalability settings.

Public function Const

bool

 

Contains

(
    ULandscapeGrassType* GrassType
)

Public function Const

SIZE_T

 

GetAllocatedSize()

Public function

TArrayView< ...

 

GetHeightData()

Public function

TArrayView< ...

 

GetWeightData

(
    const ULandscapeGrassType* Gra...
)

Public function Const

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 :

Public function Const

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)

Public function Const

bool

 

HasWeightData()

Public function

void

 

InitializeFrom

(
    const TArray< uint16 >& HeightData,
    const TMap< ULandscapeGrassType...
)

Constants

Name

Description

UnknownNumElements