Logo

sbPhysics - Shiva Bullet physics plugin 0.1.3

sbPhysics v0.1.3

 
Commands coded, but not necessarily tested in this version :-
 
*** Dynamics World creation ***
 
nWorldID = sbPhysics.createWorld ( kType, nGravity, nCollisionConfig, nBroadphase, nSolver )
bOK = sbPhysics.deleteWorld ( nWorldID )
nX, nY, nZ = sbPhysics.getGravity ()
bOK = sbPhysics.setGravity ( nGravity )
bOK = sbPhysics.stepWorld ( nStepTime )
 
 
*** Rigid Body Creation ***
 
bOK = sbPhysics.createCapsule ( sObjectTag, nMass, nRadius, nHeight, kBodyAxis )
bOK = sbPhysics.createCylinder ( sObjectTag, nMass, nExtentX, nExtentY, nExtentZ, kBodyAxis ) 
bOK = sbPhysics.createStaticPlane ( sObjectTag, nNormalX, nNormalY, nNormalZ, nPlaneConstant )
bOK = sbPhysics.createConvexHull ( sObjectTag, nMass )
bOK = sbPhysics.createCone ( sObjectTag, nMass, nRadius, nHeight, kBodyAxis ) 
bOK = sbPhysics.createSphere ( sObjectTag, nMass, nRadius )
bOK = sbPhysics.createBox ( sObjectTag, nMass, nSx, nSy, nSz )
 
 
*** Rigid Body Operations ***
 
bOK = sbPhysics.clearBodyForces ( sObjectTag )
bOK = sbPhysics.applyBodyDamping ( sObjectTag, nTimeStep )
bOK = sbPhysics.applyBodyGravity ( sObjectTag )
bOK = sbPhysics.applyBodyTorque ( sObjectTag, nTorqueX, nTorqueY, nTorqueZ )
bOK = sbPhysics.applyBodyTorque ( sObjectTag, nTorqueX, nTorqueY, nTorqueZ )
bOK = sbPhysics.applyBodyTorqueImpulse ( sObjectTag, nImpulseX, nImpulseY, nImpulseZ )
bOK = sbPhysics.applyBodyLinearImpulse ( sObjectTag, nImpulseX, nImpulseY, nImpulseZ, nPosX, nPosY, nPosZ ) 
bOK = sbPhysics.setBodyGravity ( sObjectTag, nGravityX, nGravityY, nGravityZ )
bOK = sbPhysics.setBodyDamping ( sObjectTag, nLinearDamping, nAngularDamping )
bOK = sbPhysics.setSleepingThresholds ( sObjectTag, nLinearThreshold, nAngularThreshold )
bOK = sbPhysics.translateBody ( sObjectTag, nPosX, nPosY, nPosZ )
 
 
*** Constraints ***
 
nConstraintID = sbPhysics.addPivot ( sObjectTagA, nPivotXA, nPivotYA, nPivotZA, sObjectTagB, nPivotXB, nPivotYB, nPivotZB )
nConstraintID = sbPhysics.addHinge ( sObjectTagA, nPivotXA, nPivotYA, nPivotZA, nAxisXA, nAxisYA, nAxisZA, sObjectTagB, nPivotXB, nPivotYB, nPivotZB, nAxisXB, nAxisYB, nAxisZB ) 
bOK = sbPhysics.deleteConstraint ( nConstraintID )
 
 
*** sbPhysics Constants ***
 
kBodyAxisX (Alignment on the X axis for rigid bodies axis aligned)                                               
kBodyAxisY (Alignment on the Y axis for rigid bodies axis aligned)                                             
kBodyAxisZ (Alignment on the Z axis for rigid bodies axis aligned)                                                
kDefaultCollisionConfig (Defines default collision configuration type)                                                       
kSoftBodyCollisionConfig (Defines softbody collision configuration on top of default collision configuration type)              
kDefaultDispatcher (Defines the default collision dispatcher)                                                            
kDbvtBroadphase (Defines a broadphase using two dynamic AABB bounding volume hierarchies/trees)                    
kAxisSweep3Broadphase (Defines a 3d axis sweep and prune broadphase)                                                        
kSequentialImpulseConstraintSolver (Defines the Squential Impulse Constraint solver)                                                    
kDefaultSolver (Defines the default contraint solver as the SequentialImpulseConstraintSolver)                        
kDefaultBroadphase (Defines a default broadphase as the kDbvtBroadphase)                                                 
kDefaultGravity (Defines the default gravity of -9.8 m/s in the Y axis)                                               
kCollisionWorld (Identifies a world with just collision detection)                                                   
kDiscreteRigidWorld (Identifies a world with collision detection and rigid bodies)                                       
kContinuousRigidWorld (Identifies an expanded Rigid world with optional continuous collision detection for fast moving bodies)
kSoftBodyWorld (Identifies a world with collisions, discrete rigid bodies and soft bodies)