![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
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 } |
Utility functions for applying transformations to meshes
|
strong |
| void MeshTransforms::ApplyTransform | ( | FDynamicMesh3 & | Mesh, |
| const FTransformSRT3d & | Transform, | ||
| bool | bReverseOrientationIfNeeded = false, |
||
| ETransformAttributes | TransformAttributes = ETransformAttributes::All |
||
| ) |
Apply given Transform to a Mesh.
| bReverseOrientationIfNeeded | If the Transform inverts the mesh with negative scale, also invert the triangle orientations |
| TransformAttributes | Bitflag enum specifying which attributes to transform |
| 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
| 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.
| TransformAttributes | Bitflag enum specifying which attributes to transform |
| 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
| bReverseOrientationIfNeeded | If the Transform inverts the mesh with negative scale, also invert the triangle orientations |
| TransformAttributes | Bitflag enum specifying which attributes to transform |
| MeshTransforms::ENUM_CLASS_FLAGS | ( | ETransformAttributes | ) |
| void MeshTransforms::FrameCoordsToWorld | ( | FDynamicMesh3 & | Mesh, |
| const FFrame3d & | Frame, | ||
| ETransformAttributes | TransformAttributes = ETransformAttributes::All |
||
| ) |
Transform Mesh out of local coordinates of Frame
| TransformAttributes | Bitflag enum specifying which attributes to transform |
| 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.
| 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.
| TransformAttributes | Bitflag enum specifying which attributes to transform |
| 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).
| bReverseOrientationIfNeeded | If negative scaling inverts the mesh, also invert the triangle orientations |
| TransformAttributes | Bitflag enum specifying which attributes to transform |
| 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).
| bReverseOrientationIfNeeded | If negative scaling inverts the mesh, also invert the triangle orientations |
| bOnlyPositions | If true, only apply scale positions and do not affect normals/tangents |
| void MeshTransforms::Translate | ( | FDynamicMesh3 & | Mesh, |
| const FVector3d & | Translation, | ||
| ETransformAttributes | TransformAttributes = ETransformAttributes::All |
||
| ) |
Apply Translation to the Mesh.
| TransformAttributes | Bitflag enum specifying which attributes to transform |
| void MeshTransforms::WorldToFrameCoords | ( | FDynamicMesh3 & | Mesh, |
| const FFrame3d & | Frame, | ||
| ETransformAttributes | TransformAttributes = ETransformAttributes::All |
||
| ) |
Transform Mesh into local coordinates of Frame
| TransformAttributes | Bitflag enum specifying which attributes to transform |