FPointWeightMap

A mask is simply some storage for a physical mesh parameter painted onto clothing.

Choose your operating system:

Windows

macOS

Linux

References

Module

ClothingSystemRuntimeCommon

Header

/Engine/Source/Runtime/ClothingSystemRuntimeCommon/Public/PointWeightMap.h

Include

#include "PointWeightMap.h"

Syntax

struct FPointWeightMap

Remarks

A mask is simply some storage for a physical mesh parameter painted onto clothing. Used in the editor for users to paint onto and then target to a parameter, which is then later applied to a phys mesh

Variables

Name Description

Public variable

bool

 

bEnabled

Whether this mask is enabled and able to effect final mesh values

Public variable

uint8

 

CurrentTarget

The currently targeted parameter for the mask, EWeightMapTargetCommon

Public variable

FName

 

Name

Name of the mask, mainly for users to differentiate

Public variable

TArray< float >

 

Values

The actual values stored in the mask

Constructors

Name Description

Public function

FPointWeightMap()

Destructors

Name Description

Public function

~FPointWeightMap()

Functions

Name Description

Public function Const

bool

 

AreAllBelowThreshold

(
    const int32 Index0,
    const int32 Index1,
    const int32 Index2,
    const float Threshold
)

Return whether all of the specified triangle points have weight below (or equal) to the specified

Public function Const

bool

 

AreAnyBelowThreshold

(
    const int32 Index0,
    const int32 Index1,
    const int32 Index2,
    const float Threshold
)

Return whether at least one of the specified triangle points has weight below (or equal) to the specified

Public function

void

 

CalcRanges

(
    float& MinValue,
    float& MaxValue
)

Calculates Min/Max values based on values.

Public function

void

 

Empty()

Empty this map of any values.

Public function Const

float

 

GetValue

(
    int32 Index
)

Get a value from the map, or return 0 if the index is out of bounds.

Public function

void

 

Initialize

(
    const int32 NumPoints
)

Reset this map to the specified number of points, and set all the values to zero.

Public function

void

 

Initialize

(
    const FPointWeightMap& Source,
    T Target
)

Initialize a weight map from another weight map while enabling and setting a new target.

Public function Const

bool

 

IsBelowThreshold

(
    const int32 Index,
    const float Threshold
)

Return whether the specified point weight is below (or equal) to the specified threshold.

Public function Const

bool

 

IsZeroed()

Return whether all points' values are zero.

Public function Const

int32

 

Num()

Return the number of values in this map.

Public function

void

 

SetValue

(
    int32 Index,
    float Value
)

Set a value in the map checking first whether the index is within bounds.

Operators

Name Description

Public function Const

const float ...

 

operator[]

(
    int32 Index
)

Return the current float value for the requested point.

Public function

float &

 

operator[]

(
    int32 Index
)

Return the current float value for the requested point.