UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MeshTransforms Namespace Reference

Enumerations

enum class  ETransformAttributes {
  Positions = 1 << 0 , VertexNormals = 1 << 1 , Normals = 1 << 2 , Tangents = 1 << 3 ,
  SculptLayers = 1 << 4 , All = Positions | VertexNormals | Normals | Tangents | SculptLayers
}
 

Functions

 ENUM_CLASS_FLAGS (ETransformAttributes)
 
GEOMETRYCORE_API void Translate (FDynamicMesh3 &Mesh, const FVector3d &Translation, ETransformAttributes TransformAttributes=ETransformAttributes::All)
 
GEOMETRYCORE_API void Scale (FDynamicMesh3 &Mesh, const FVector3d &Scale, const FVector3d &Origin, bool bReverseOrientationIfNeeded=false, bool bOnlyPositions=false)
 
GEOMETRYCORE_API void Scale (FDynamicMesh3 &Mesh, const FVector3d &Scale, const FVector3d &Origin, bool bReverseOrientationIfNeeded, ETransformAttributes TransformAttributes)
 
GEOMETRYCORE_API void Rotate (FDynamicMesh3 &Mesh, const FRotator &Rotation, const FVector3d &RotationOrigin, ETransformAttributes TransformAttributes=ETransformAttributes::All)
 
GEOMETRYCORE_API void WorldToFrameCoords (FDynamicMesh3 &Mesh, const FFrame3d &Frame, ETransformAttributes TransformAttributes=ETransformAttributes::All)
 
GEOMETRYCORE_API void FrameCoordsToWorld (FDynamicMesh3 &Mesh, const FFrame3d &Frame, ETransformAttributes TransformAttributes=ETransformAttributes::All)
 
GEOMETRYCORE_API void ApplyTransform (FDynamicMesh3 &Mesh, const FTransformSRT3d &Transform, bool bReverseOrientationIfNeeded=false, ETransformAttributes TransformAttributes=ETransformAttributes::All)
 
GEOMETRYCORE_API void ApplyTransformInverse (FDynamicMesh3 &Mesh, const FTransformSRT3d &Transform, bool bReverseOrientationIfNeeded=false, ETransformAttributes TransformAttributes=ETransformAttributes::All)
 
GEOMETRYCORE_API void ApplyTransform (FDynamicMesh3 &Mesh, TFunctionRef< FVector3d(const FVector3d &)> PositionTransform, TFunctionRef< FVector3f(const FVector3f &)> NormalTransform)
 
GEOMETRYCORE_API void ApplyTransform (FDynamicMesh3 &Mesh, TFunctionRef< FVector3d(const FVector3d &)> PositionTransform, TFunctionRef< FVector3f(const FVector3f &)> NormalTransform, TFunctionRef< FVector3f(const FVector3f &)> TangentTransform, ETransformAttributes TransformAttributes=ETransformAttributes::All)
 
GEOMETRYCORE_API void ReverseOrientationIfNeeded (FDynamicMesh3 &Mesh, const FTransformSRT3d &Transform)
 

Detailed Description

Utility functions for applying transformations to meshes

Enumeration Type Documentation

◆ ETransformAttributes

Enumerator
Positions 
VertexNormals 
Normals 
Tangents 
SculptLayers 
All 

Function Documentation

◆ ApplyTransform() [1/3]

void MeshTransforms::ApplyTransform ( FDynamicMesh3 Mesh,
const FTransformSRT3d Transform,
bool  bReverseOrientationIfNeeded = false,
ETransformAttributes  TransformAttributes = ETransformAttributes::All 
)

Apply given Transform to a Mesh.

Parameters
bReverseOrientationIfNeededIf the Transform inverts the mesh with negative scale, also invert the triangle orientations
TransformAttributesBitflag enum specifying which attributes to transform

◆ ApplyTransform() [2/3]

void MeshTransforms::ApplyTransform ( FDynamicMesh3 Mesh,
TFunctionRef< FVector3d(const FVector3d &)>  PositionTransform,
TFunctionRef< FVector3f(const FVector3f &)>  NormalTransform 
)

Apply given Transform to a Mesh. Modifies Vertex Positions and Normals, and any Per-Triangle Normal Overlays

◆ ApplyTransform() [3/3]

void MeshTransforms::ApplyTransform ( FDynamicMesh3 Mesh,
TFunctionRef< FVector3d(const FVector3d &)>  PositionTransform,
TFunctionRef< FVector3f(const FVector3f &)>  NormalTransform,
TFunctionRef< FVector3f(const FVector3f &)>  TangentTransform,
ETransformAttributes  TransformAttributes = ETransformAttributes::All 
)

Apply given Transform to a Mesh.

Parameters
TransformAttributesBitflag enum specifying which attributes to transform

◆ ApplyTransformInverse()

void MeshTransforms::ApplyTransformInverse ( FDynamicMesh3 Mesh,
const FTransformSRT3d Transform,
bool  bReverseOrientationIfNeeded = false,
ETransformAttributes  TransformAttributes = ETransformAttributes::All 
)

Apply inverse of given Transform to a Mesh. Modifies Vertex Positions and Normals, and any Per-Triangle Normal Overlays

Parameters
bReverseOrientationIfNeededIf the Transform inverts the mesh with negative scale, also invert the triangle orientations
TransformAttributesBitflag enum specifying which attributes to transform

◆ ENUM_CLASS_FLAGS()

MeshTransforms::ENUM_CLASS_FLAGS ( ETransformAttributes  )

◆ FrameCoordsToWorld()

void MeshTransforms::FrameCoordsToWorld ( FDynamicMesh3 Mesh,
const FFrame3d Frame,
ETransformAttributes  TransformAttributes = ETransformAttributes::All 
)

Transform Mesh out of local coordinates of Frame

Parameters
TransformAttributesBitflag enum specifying which attributes to transform

◆ ReverseOrientationIfNeeded()

void MeshTransforms::ReverseOrientationIfNeeded ( FDynamicMesh3 Mesh,
const FTransformSRT3d Transform 
)

If applying Transform would invert Mesh w/ a negative scale, then invert Mesh's triangle orientations. Note: Does not apply the transform.

◆ Rotate()

void MeshTransforms::Rotate ( FDynamicMesh3 Mesh,
const FRotator Rotation,
const FVector3d RotationOrigin,
ETransformAttributes  TransformAttributes = ETransformAttributes::All 
)

Apply Rotation to the Mesh, relative to the given RotationOrigin.

Parameters
TransformAttributesBitflag enum specifying which attributes to transform

◆ Scale() [1/2]

void MeshTransforms::Scale ( FDynamicMesh3 Mesh,
const FVector3d Scale,
const FVector3d Origin,
bool  bReverseOrientationIfNeeded,
ETransformAttributes  TransformAttributes 
)

Apply Scale to Mesh, relative to given Origin. Correctly updates normals/tangents as needed (unless TransformAttributes flags are set not to update them).

Parameters
bReverseOrientationIfNeededIf negative scaling inverts the mesh, also invert the triangle orientations
TransformAttributesBitflag enum specifying which attributes to transform

◆ Scale() [2/2]

void MeshTransforms::Scale ( FDynamicMesh3 Mesh,
const FVector3d Scale,
const FVector3d Origin,
bool  bReverseOrientationIfNeeded = false,
bool  bOnlyPositions = false 
)

Apply Scale to Mesh, relative to given Origin. Correctly updates normals/tangents as needed (unless bOnlyPositions is true).

Parameters
bReverseOrientationIfNeededIf negative scaling inverts the mesh, also invert the triangle orientations
bOnlyPositionsIf true, only apply scale positions and do not affect normals/tangents

◆ Translate()

void MeshTransforms::Translate ( FDynamicMesh3 Mesh,
const FVector3d Translation,
ETransformAttributes  TransformAttributes = ETransformAttributes::All 
)

Apply Translation to the Mesh.

Parameters
TransformAttributesBitflag enum specifying which attributes to transform

◆ WorldToFrameCoords()

void MeshTransforms::WorldToFrameCoords ( FDynamicMesh3 Mesh,
const FFrame3d Frame,
ETransformAttributes  TransformAttributes = ETransformAttributes::All 
)

Transform Mesh into local coordinates of Frame

Parameters
TransformAttributesBitflag enum specifying which attributes to transform