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

Typedefs

using FFrame3d = UE::Geometry::FFrame3d
 

Functions

template<class TriangleMeshType >
void Translate (TriangleMeshType &Mesh, const FVector3d &Translation)
 
template<class TriangleMeshType >
void WorldToFrameCoords (TriangleMeshType &Mesh, const FFrame3d &Frame)
 
template<class TriangleMeshType >
void FrameCoordsToWorld (TriangleMeshType &Mesh, const FFrame3d &Frame)
 
template<class TriangleMeshType >
void ApplyTransform (TriangleMeshType &Mesh, const FTransformSRT3d &Transform)
 
template<class TriangleMeshType >
void ApplyTransformInverse (TriangleMeshType &Mesh, const FTransformSRT3d &Transform)
 
template<class TriangleMeshType >
void ApplyTransform (TriangleMeshType &Mesh, TFunctionRef< FVector3d(const FVector3d &)> PositionTransform, TFunctionRef< FVector3f(const FVector3f &)> NormalTransform)
 

Detailed Description

A variant of DynamicMesh module's MeshTransforms that is generalized for MeshAdapter-based meshes Unlike a lot of MeshAdapter-based functions, most of these require Set* and *Normal functions to exist on the Adapter Specifically, these apply to any mesh class that implements GetVertex, SetVertex, GetNormal, SetNormal, IsVertex, IsNormal, MaxVertexID, MaxNormalID

Note that unlike a lot of MeshAdapter things, FDynamicMesh3 will need to be wrapped by an adapter too for anything that changes normals, because the FDynamicMesh3 interface for normals a little too involved to make it the access pattern for the adapter. For now, will leave the FDynamicMesh3 specific version inside the DynamicMesh module (TODO: consider reworking it to just create a tiny shim and call these functions?)

Typedef Documentation

◆ FFrame3d

Function Documentation

◆ ApplyTransform() [1/2]

template<class TriangleMeshType >
void MeshAdapterTransforms::ApplyTransform ( TriangleMeshType Mesh,
const FTransformSRT3d Transform 
)

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

◆ ApplyTransform() [2/2]

template<class TriangleMeshType >
void MeshAdapterTransforms::ApplyTransform ( TriangleMeshType 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

◆ ApplyTransformInverse()

template<class TriangleMeshType >
void MeshAdapterTransforms::ApplyTransformInverse ( TriangleMeshType Mesh,
const FTransformSRT3d Transform 
)

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

◆ FrameCoordsToWorld()

template<class TriangleMeshType >
void MeshAdapterTransforms::FrameCoordsToWorld ( TriangleMeshType Mesh,
const FFrame3d Frame 
)

Transform Mesh out of local coordinates of Frame

◆ Translate()

template<class TriangleMeshType >
void MeshAdapterTransforms::Translate ( TriangleMeshType Mesh,
const FVector3d Translation 
)

Apply Translation to vertex positions of Mesh. Does not modify any other attributes.

◆ WorldToFrameCoords()

template<class TriangleMeshType >
void MeshAdapterTransforms::WorldToFrameCoords ( TriangleMeshType Mesh,
const FFrame3d Frame 
)

Transform Mesh into local coordinates of Frame