Logo Search packages:      
Sourcecode: blender version File versions  Download package

static const btRigidBody* btRigidBody::upcast ( const btCollisionObject *  colObj  )  [inline, static]

to keep collision detection and dynamics separate we don't store a rigidbody pointer but a rigidbody is derived from btCollisionObject, so we can safely perform an upcast

Definition at line 162 of file btRigidBody.h.

Referenced by btDiscreteDynamicsWorld::applyGravity(), btSimpleDynamicsWorld::clearForces(), btDiscreteDynamicsWorld::clearForces(), btSequentialImpulseConstraintSolver::convertContact(), and btSimpleDynamicsWorld::synchronizeMotionStates().

            if (colObj->getInternalType()==btCollisionObject::CO_RIGID_BODY)
                  return (const btRigidBody*)colObj;
            return 0;

Generated by  Doxygen 1.6.0   Back to index