Navigation
API > API/Runtime > API/Runtime/GeometryCore
Manages a dynamic mesh attribute set's sculpt layer data.
| Name | FDynamicMeshSculptLayers |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/DynamicMesh/DynamicMeshSculptLayers.h |
| Include Path | #include "DynamicMesh/DynamicMeshSculptLayers.h" |
Syntax
class FDynamicMeshSculptLayers
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveLayer | int32 | Indicates which layer is currently being edited (and is therefore reflected in the mesh vertices, rather than the layer data) | DynamicMesh/DynamicMeshSculptLayers.h | |
| Layers | TIndirectArray< FDynamicMeshSculptLayerAttribute > | Sculpt layers are stored as vertex position offsets from the previous layer, with layer zero storing initial positions. | DynamicMesh/DynamicMeshSculptLayers.h | |
| LayerWeights | TArray< double > | Weights per sculpt layer. | DynamicMesh/DynamicMeshSculptLayers.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CopyThroughMapping
(
const FDynamicMeshSculptLayers& Other, |
Copy across sculpt layer data via a vertex mapping, for all layers that exist on both this and the other layers. | DynamicMesh/DynamicMeshSculptLayers.h | |
bool DiscardSculptLayer
(
int32 LayerIndex |
Remove the given sculpt layer, discarding its contribution to the shape. | DynamicMesh/DynamicMeshSculptLayers.h | |
int32 GetActiveLayer() |
DynamicMesh/DynamicMeshSculptLayers.h | ||
const FDynamicMeshSculptLayerAttribute * GetLayer
(
int32 LayerIndex |
Directly access the sculpt layer data. | DynamicMesh/DynamicMeshSculptLayers.h | |
FDynamicMeshSculptLayerAttribute * GetLayer
(
int32 LayerIndex |
Directly access the sculpt layer data Note: Must explicitly call "RebuildMesh" for modifications to be applied to the mesh vertex positions | DynamicMesh/DynamicMeshSculptLayers.h | |
TConstArrayView< double > GetLayerWeights() |
Get the current sculpt layer weights. | DynamicMesh/DynamicMeshSculptLayers.h | |
bool IsEnabled() |
DynamicMesh/DynamicMeshSculptLayers.h | ||
bool MergeSculptLayers
(
int32 StartIndex, |
Merge the contribution of a range of layers. | DynamicMesh/DynamicMeshSculptLayers.h | |
bool MoveLayer
(
const int32 InitLayerIndex, |
Moves the layer at the first provided index to the location given by the second provided index | DynamicMesh/DynamicMeshSculptLayers.h | |
int32 NumLayers() |
DynamicMesh/DynamicMeshSculptLayers.h | ||
void RebuildMesh() |
Rebuild mesh from sculpt layer offsets + weights, ignoring current mesh positions. | DynamicMesh/DynamicMeshSculptLayers.h | |
int32 SetActiveLayer
(
int32 LayerIndex |
Attempt to set the active sculpt layer to the requested index. | DynamicMesh/DynamicMeshSculptLayers.h | |
bool UpdateLayersFromMesh () |
Update the active layer's sculpt offsets so that the sum of sculpt layers w/ current weights gives the current mesh vertex positions. | DynamicMesh/DynamicMeshSculptLayers.h | |
void UpdateLayerWeights
(
TConstArrayView< double > InLayerWeights |
Set new sculpt layer weights. | DynamicMesh/DynamicMeshSculptLayers.h |