class MAGES::MeshDeformations::BasePhysicsActor¶
Overview¶
A base class for all physics actors. More…
class BasePhysicsActor: public MonoBehaviour
{
public:
// properties
PhysicsWorld PhysicsWorld;
SimulationMesh SharedSimulationMesh;
SimulationMesh SimulationMesh;
bool IsPartOfPhysicsWorld;
UnityEvent<PhysicsWorld> AddedToPhysicsWorld;
UnityEvent<PhysicsWorld> RemovedFromPhysicsWorld;
// methods
virtual void AddToPhysicsWorld();
virtual void RemoveFromPhysicsWorld();
};
// direct descendants
class ClothActor;
class DynamicSoftbodyActor;
class PhysicsActor;
class RigidbodyActor;
class RopeActor;
class SoftbodyActor;
Detailed Documentation¶
A base class for all physics actors.
Properties¶
PhysicsWorld PhysicsWorld
Gets or sets the PhysicsWorld that the simulation is or will become part of.
SimulationMesh SharedSimulationMesh
Gets or sets the shared simulation mesh.
The actual runtime simulation SimulationMesh is created from this shared mesh as an instance of it.
SimulationMesh SimulationMesh
Gets the runtime simulation mesh.
bool IsPartOfPhysicsWorld
Gets a value indicating whether the simulation mesh is part of the physics world.
UnityEvent<PhysicsWorld> AddedToPhysicsWorld
Gets or sets the callback invoked when this actor is added to the physics world.
UnityEvent<PhysicsWorld> RemovedFromPhysicsWorld
Gets or sets the callback invoked when this actor is removed from the physics world.
Methods¶
virtual void AddToPhysicsWorld()
Override this function to add the simulation mesh to the physics world.
virtual void RemoveFromPhysicsWorld()
Override this function to remove the simulation mesh from the physics world.