/// <summary> /// Constructor of the PxActor. /// </summary> /// <param name="physicsScene"> The physics scene that this actor /// will act within. </param> /// <param name="physicsObject"> The physics object that this actor /// will act upon. </param> /// <param name="actorName"> The physics actor name to identify /// the intent. <param> public PxActor(PxScene physicsScene, PxPhysObject physicsObject, string actorName) { PhysicsScene = physicsScene; PhysicsObject = physicsObject; ActorName = actorName; Enabled = true; }
/// <summary> /// Return the physics scene. /// </summary> /// <param name="regionName">Name of the region the scene /// will represent</param> /// <returns>The physics scene</returns> public PhysicsScene GetScene(String regionName) { // Create a new scene if one doesn't already exist if (m_scene == null) { m_scene = new PxScene(GetName(), regionName, m_physx); } // Return the physics scene return(m_scene); }
/// <summary> /// Constructor for the buoyancy actor, includes the physics scene, /// the physics object, and the name of this physics actor. /// </summary> /// <param name="physicsScene"> The physics scene that this actor will /// act within. </param> /// <param name="physicsObject"> The physics object that this actor will /// act upon. </param> /// <param name="actorName"> The physics actor name to identify /// the intent. <param> public PxActorBuoyancy(PxScene physicsScene, PxPhysObject physObject, string actorName) : base(physicsScene, physObject, actorName) { m_buoyancyMotor = null; }
/// <summary> /// Constructor for the PxActorCollection, which takes in the /// physics scene and initializes everything need for the /// PxActorCollection. /// </summary> public PxActorCollection(PxScene physicsScene) { PhysicsScene = physicsScene; PhysicalActors = new Dictionary <string, PxActor>(); }