Navigation
API > API/Plugins > API/Plugins/DynamicMesh
Description
Solves the linear system for p_vec ( Transpose(L) * L + (0 0 ) ) p_vec = source_vec + ( 0 ) ( (0 lambda^2) ) ( lambda^2 c_vec )
where: L := laplacian for the mesh, source_vec := Transpose(L)*L mesh_vertex_positions lambda := weights c_vec := constrained positions
Expected Use:
// Create Deformation Solver from Mesh TUniquePtr
// Add constraints. for.. { int32 VtxId = ..; double Weight = ..; FVector3d TargetPos = ..; bool bPostFix = ...; MeshDeformer->AddConstraint(VtxId, Weight, TargetPos, bPostFix); }
// Solve for new mesh vertex locations TArray
// Update Mesh? for (int32 VtxId : DynamicMesh.VertexIndices()) DynamicMesh.SetVertex(VtxId, PositionBuffer[VtxId]); ...
// Update constraint positions. for .. { int32 VtxId = ..; FVector3d TargetPos = ..; bool bPostFix = ...; MeshDeformer->UpdateConstraintPosition(VtxId, TargetPos, bPostFix); }
// Solve for new vertex locations. MeshDeformer->Deform(PositionBuffer); // Update Mesh?
| Name | UE::MeshDeformation::ConstructConstrainedMeshDeformer |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Solvers/ConstrainedMeshDeformer.h |
| Include Path | #include "Solvers/ConstrainedMeshDeformer.h" |
| Source | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Private/Solvers/ConstrainedMeshDeformer.cpp |
namespace UE
{
namespace MeshDeformation
{
TUniquePtr < UE::Solvers::IConstrainedMeshSolver > UE::MeshDeformation::ConstructConstrainedMeshDeformer
(
const ELaplacianWeightScheme WeightScheme,
const FDynamicMesh3 & DynamicMesh
)
}
}