RigidBodySimulation (object)¶
An object for managing rigid body simulations.
The RigidBodySimulation object provides a tool to combine Fabric Engine systems such as Geometry with Bullet Physics.
The RigidBodySimulation is intended to be used as an example when setting up your own simulations.
Members¶
Boolean | initialized | |
Scalar | timeStep | |
UInt32 | subSteps | |
Vec3 | gravity | |
BulletRigidBody[] | rigidBodies | |
BulletBroadphaseInterface | broadphase | |
BulletCollisionDispatcher | dispatcher | |
BulletConstraintSolver | solver | |
BulletCollisionConfiguration | collisionConfiguration | |
BulletDynamicsWorld | dynamicsWorld | |
BulletSoftRigidCollisionAlgorithm[] | SoftRigidCollisionAlgorithms |
Methods¶
Methods in detail¶
RigidBodySimulation ( in RigidBodySimulation other )
copy constructor
RigidBodySimulation ( in Scalar fps, in UInt32 subSteps, in Vec3 gravity )
BulletRigidBody[] RigidBodySimulation.addRigidBodies! ( in Float32 mass[], in Float32 friction[], in Float32 restitution[], in Xfo xfo[], in Vec3 linearVelocity[], in Vec3 angularVelocity[], in BulletCollisionShape shape[] )
BulletRigidBody RigidBodySimulation.addRigidBody! ( in Float32 mass, in Float32 friction, in Float32 restitution, in Xfo xfo, in Vec3 linearVelocity, in Vec3 angularVelocity, in BulletCollisionShape shape )
RigidBodySimulation RigidBodySimulation.clone? ()
clone method
RigidBodySimulation.createGround! ()
Creates a large box shape to be used at the ground plane.
BulletRigidBody[] RigidBodySimulation.getAllRigidBodies? ()
returns the transforms of all rigid rigidBodies
Xfo[] RigidBodySimulation.getAllRigidBodyXfos? ()
returns the transforms of all rigid rigidBodies
BulletRigidBody RigidBodySimulation.getRigidBody? ( in Index index )
returns a given rigidbody’s transform
Xfo RigidBodySimulation.getRigidBodyXfo? ( in Index index )
returns a given rigidbody’s transform
RigidBodySimulation.initPhysics! ()
Initializes the physics simulation. register some softBody collision algorithms on top of the default BulletDefaultCollisionConfiguration
RigidBodySimulation.removeAllRigidBodies! ()
RigidBodySimulation.resetSimulation! ()
Resets the simulation, moving all the objects back to thier initial positions. create a copy of the array, not a reference! reset some internal cached data in the broadphase
RigidBodySimulation.setAllRigidBodyXfos! ( in Xfo xfos[] )
sets the transforms of all rigid rigidBodies
RigidBodySimulation.setRigidBodyXfo! ( in Index index, in Xfo xfo )
sets a given rigidbody’s transform
RigidBodySimulation.stepSimulation? ()
Updates the simulation
RigidBodySimulation.updateCollisionShape! ( in BulletCollisionShape shape )
doesn’t do anything, just ensures to build nice graphs
RigidBodySimulation.updateCollisionShapes! ( in BulletCollisionShape shapes[] )
doesn’t do anything, just ensures to build nice graphs
RigidBodySimulation.updateRigidBodies! ( in BulletRigidBody bodies[] )
doesn’t do anything, just ensures to build nice graphs
RigidBodySimulation.updateRigidBody! ( in BulletRigidBody body )
doesn’t do anything, just ensures to build nice graphs
~ RigidBodySimulation ()
Cleans up the simulation