Navigation
API > API/Plugins > API/Plugins/DynamicMesh
Free-form deformation lattice. Initialize it with a mesh and desired resolution, get the initial lattice points out. Then pass in deformed lattice points and it will compute deformed mesh vertex positions.
| Name | FFFDLattice |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Operations/FFDLattice.h |
| Include Path | #include "Operations/FFDLattice.h" |
Syntax
class FFFDLattice
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FFFDLattice
(
const FVector3i& InDims, |
Create a lattice that fits the given mesh and has the given resolution along each dimension. | Operations/FFDLattice.h | |
FFFDLattice
(
const FVector3i& InDims, |
Create a lattice that fits the oriented box defined by the AABB and Transform, and has the given resolution along each dimension. | Operations/FFDLattice.h |
Structs
| Name | Remarks |
|---|---|
| FEmbedding | Linear interpolation information. There should be one of these per mesh vertex. |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int ControlPointIndexFromCoordinates
(
int i, |
Get the index into the flat TArray of positions given the (i,j,k) coordinates in the lattice. | Operations/FFDLattice.h | |
int ControlPointIndexFromCoordinates
(
const FVector3i& Index |
Get the index into the flat TArray of positions given the (i,j,k) coordinates in the lattice. | Operations/FFDLattice.h | |
void GenerateInitialLatticePositions
(
TArray< FVector3d >& OutLatticePositions |
Return the set of lattice corner positions in undeformed state. | Operations/FFDLattice.h | |
| Return the lattice edges by index. The indices refer to the array of lattice positions returned by GenerateInitialLatticePositions. | Operations/FFDLattice.h | ||
const FVector3d & GetCellSize() |
3D size of a lattice cell | Operations/FFDLattice.h | |
void GetDeformedMeshVertexPositions
(
const TArray< FVector3d >& LatticeControlPoints, |
Using the Lattice's current control point positions and the original embedding information, compute the deformed mesh vertex positions. | Operations/FFDLattice.h | |
const FVector3i & GetDimensions() |
Number of lattice points in each dimension. | Operations/FFDLattice.h | |
const FAxisAlignedBox3d & GetInitialBounds() |
Extents of the lattice before it is deformed. | Operations/FFDLattice.h | |
void GetRotatedMeshVertexNormals
(
const TArray< FVector3d >& LatticeControlPoints, |
Using the Lattice's current control point positions, the original embedding information, and the original normals, compute the new rotated normals | Operations/FFDLattice.h | |
void GetRotatedOverlayNormals
(
const TArray< FVector3d >& LatticeControlPoints, |
Using the Lattice's current control point positions, the original embedding information, and the original normals contained in an overlay, compute the new rotated normals | Operations/FFDLattice.h | |
bool VertexHasValidEmbedding
(
int32 VertexIndex |
Whether the given vertex has a valid embedding, i.e. whether the original vertex location was inside a lattice cell and it would be affected by lattice deformation. | Operations/FFDLattice.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Clamp the given index to [0, Dims] and return the current lattice point position at the clamped index. | Operations/FFDLattice.h | ||
void ComputeInitialEmbedding
(
const FDynamicMesh3& Mesh, |
For each vertex in Mesh, compute the lattice cell it resides in and its weighting. | Operations/FFDLattice.h | |
FVector3d ComputeTrilinearWeights
(
const FVector3d& Pt, |
Compute cell index and linear interpolation weights for a given point. | Operations/FFDLattice.h | |
FMatrix3d CubicInterpolationJacobian
(
const FEmbedding& VertexEmbedding, |
Operations/FFDLattice.h | ||
| Compute the extrapolated position for a "virtual" lattice control point outside of the actual lattice. | Operations/FFDLattice.h | ||
void GetValuePair
(
int I, |
Helper for linear interpolation. Returns lattice points at (I,J,K) and (I+1,J,K). | Operations/FFDLattice.h | |
void InitLattice
(
float Padding |
Ccnstructor helper function for setting up lattice data. | Operations/FFDLattice.h | |
FVector3d InterpolatedPosition
(
const FEmbedding& VertexEmbedding, |
Use the given cell index and weights to compute the interpolated position. | Operations/FFDLattice.h | |
FVector3d InterpolatedPositionCubic
(
const FEmbedding& VertexEmbedding, |
Operations/FFDLattice.h | ||
FMatrix3d LinearInterpolationJacobian
(
const FEmbedding& VertexEmbedding, |
Operations/FFDLattice.h |