class MAGES::MeshDeformations::DynamicSoftbodyActor

Overview

A dynamic softbody actor. More…

class DynamicSoftbodyActor: public MAGES::MeshDeformations::BasePhysicsActor
{
public:
    // structs

    struct ClearCountersJob;
    struct FindResidualDistanceConstraintsJob;
    struct InitializeParticleToVertexMappingJob;
    struct NormalizeNormalsJob;
    struct RecreateFlatMeshJob;
    struct RecreateSmoothMeshJob;
    struct RemoveNeighborsFromDifferentSubMeshesJob;
    struct RemoveResidualDistanceConstraintsJob;
    struct RemoveVolumeConstraintsWithLimitedNumberOfNeighbors;
    struct SubMeshIndexData;
    struct UpdateKinematicParticlesJob;
    struct UpdateMeshJob;

    // classes

    class SubMeshIndexDatas;

    // properties

    override SimulationMesh SharedSimulationMesh;
    uint Layer;
    bool UpdateKinematicParticles;
    bool SmoothShading;
    bool GenerateFacesInPhysicsMaterialBoundaries;
    bool RemoveResidualDistanceConstraints;
    bool RemoveVolumeConstraintsWithLimitedNeighbors;
    int MinNeighborsBeforeVolumeConstraintsRemoval;

    // methods

    virtual override void AddToPhysicsWorld();
    virtual override void RemoveFromPhysicsWorld();
    void CutSplit(Disc cuttingDisc);
    void CutRemove(Disc cuttingDisc);
    void GenerateUVMapsFromMesh(Mesh mesh);
};

Inherited Members

public:
    // properties

    PhysicsWorld PhysicsWorld;
    SimulationMesh SharedSimulationMesh;
    SimulationMesh SimulationMesh;
    bool IsPartOfPhysicsWorld;
    UnityEvent<PhysicsWorld> AddedToPhysicsWorld;
    UnityEvent<PhysicsWorld> RemovedFromPhysicsWorld;

    // methods

    virtual void AddToPhysicsWorld();
    virtual void RemoveFromPhysicsWorld();

Detailed Documentation

A dynamic softbody actor.

The dynamic softbody, creates the render mesh dyanamically based on the current volume constraints of the simulation mesh.<br> This allows us to cut the softbody based on forces and the render mesh to be automatically updated.

Properties

uint Layer

Gets or sets the layer used for collision filtering.

bool UpdateKinematicParticles

Gets or sets a value indicating whether to update the kinematic particles position when this actor’s transform is updated.

bool SmoothShading

Gets or sets a value indicating whether to generate smooth or flat shading for the render mesh.

bool GenerateFacesInPhysicsMaterialBoundaries

Gets or sets a value indicating whether to generate faces (triangles) in the boundaries of the physics material.

bool RemoveResidualDistanceConstraints

Gets or sets a value indicating whether should remove residual distance constraints after a tear.

bool RemoveVolumeConstraintsWithLimitedNeighbors

Gets or sets a value indicating whether after the simulation mesh has been modified, the volume constraints with limited number of neighbors should be removed.

int MinNeighborsBeforeVolumeConstraintsRemoval

Gets or sets the minimum number of neighbors before volume constraints removal.

Methods

virtual override void AddToPhysicsWorld()

Override this function to add the simulation mesh to the physics world.

virtual override void RemoveFromPhysicsWorld()

Override this function to remove the simulation mesh from the physics world.

void CutSplit(Disc cuttingDisc)

Cut the mesh with a disc by splitting intersected tetrahedra. Only allowed to be called from the PhysicsUpdate Event.

Parameters:

cuttingDisc

The disc based on which to cut.

void CutRemove(Disc cuttingDisc)

Cut the mesh with a disc by removing intersected tetrahedra. Only allowed to be called from the PhysicsUpdate Event.

Parameters:

cuttingDisc

The disc based on which to cut.

void GenerateUVMapsFromMesh(Mesh mesh)

Uses the mesh for generating UV Maps.

Parameters:

mesh

The mesh to use UV maps from.