BP Class: TrilerpMeshComponent
C++ Impl | UTrilerpMeshComponent |
---|
A DynamicMeshComponent which supports trilinear interpolation of the underlying mesh.
Properties
-
Lattice
Array of
Vectors
Offsets from interpolation lattice corners. Do not modify length.
First four values represent the bottom four corners, second four the top four corners.
Because this is a list of offsets, if all vectors are zero the trilinear interpolation will not modify the mesh, it will just return the original vertex positions.
-
Source Bounds
BoxSphereBounds
The original (untransformed) bounds of the source mesh this component was initialized with.
Functions
-
Centroid
C++ Impl UTrilerpMeshComponent::Centroid
-
DebugDrawLattice
-
GetCentroid
Computes the centroid (in world-space) of the specified lattice face.
Inputs
-
Face
ELatticeFace
The face to get the centroid of.
Outputs
-
Return Value
Vector
The centroid of the target Face.
-
-
GetCornersWS
Gets the world-space positions of the Lattice corners (including offsets).
Outputs
-
Return Value
Array of
Vectors
The world-space positions of the current lattice points.
-
-
GetSourceCornersWS
Gets the world-space positions of the untransformed Lattice corners. i.e. the original/base position based on the input mesh bounds.
Outputs
-
Return Value
Array of
Vectors
The world-space positions of the untransformed lattice points.
-
-
InitFromDynamicMesh
Initializes the dynamic mesh from another given dynamic mesh.
Inputs
-
Mesh
Dynamic Mesh
Mesh to copy from.
Outputs
-
Return Value
bool
True
if copying the mesh data was successful, otherwiseFalse
.
-
-
InitFromSkeletalMesh
Initializes the dynamic mesh from a given skeletal mesh.
Inputs
-
Mesh
Skeletal Mesh
Mesh to copy from.
Outputs
-
Return Value
bool
True
if copying the mesh data was successful, otherwiseFalse
.
-
-
InitFromStaticMesh
Initializes the dynamic mesh from a given static mesh.
Inputs
-
Mesh
Static Mesh
Mesh to copy from.
-
Include Collision
EIncludeCollisionType
If not set to
None
, then will also copy the given static mesh's collision data and update/generate collisions each time UpdateMesh is called.
Outputs
-
Return Value
bool
True
if copying the mesh data was successful, otherwiseFalse
.
-
-
RotateFace
Applies a rotation to one whole side of the lattice, relative to its current orientation, around the centroid of the face vertices.
Calls UpdateMesh.
Inputs
-
Face
ELatticeFace
Face to rotate.
-
Rotation
Rotator
Rotation to apply.
-
-
ScaleFace
C++ Impl UTrilerpMeshComponent::ScaleFace
Scales a face by moving its corners relative to their centroid.
Calls UpdateMesh.
Inputs
-
Face
ELatticeFace
Face to Scale.
-
Scale
Vector
Scale factor
-
-
SetFaceTranslation
Sets the translation (absolute movement) of one whole side of the lattice, relative to the base position of the vertices on that face.
Given translation is expected to be in world space.
Calls UpdateMesh.
Inputs
-
Face
ELatticeFace
Face to translate.
-
Translation
Vector
-
-
SetLatticeWS
-
TranslateFace
Applies a translation (relative movement) to one whole side of the lattice.
Given translation is expected to be in world space.
Calls UpdateMesh.
Inputs
-
Face
ELatticeFace
Face to translate.
-
Delta Translation
Vector
Relative translation amount.
-
-
UpdateMesh
Updates the underlying mesh data to match the current Lattice configuration.
Should be called whenever Lattice has been modified to keep the mesh up-to-date.
For any questions, help, suggestions or feature requests, please feel free to contact me at nbpsup@gmail.com