Back to index

supertuxkart  0.5+dfsg1
Classes | Functions | Variables
btRaycastVehicle.cpp File Reference
#include "LinearMath/btVector3.h"
#include "btRaycastVehicle.h"
#include "BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h"
#include "BulletDynamics/ConstraintSolver/btJacobianEntry.h"
#include "LinearMath/btQuaternion.h"
#include "BulletDynamics/Dynamics/btDynamicsWorld.h"
#include "btVehicleRaycaster.h"
#include "btWheelInfo.h"
#include "LinearMath/btMinMax.h"
#include "BulletDynamics/ConstraintSolver/btContactConstraint.h"

Go to the source code of this file.


struct  btWheelContactPoint


btScalar calcRollingFriction (btWheelContactPoint &contactPoint)


static btRigidBody s_fixedObject (0, 0, 0)
btScalar sideFrictionStiffness2 = btScalar(1.0)

Function Documentation

Definition at line 489 of file btRaycastVehicle.cpp.


       btScalar j1=0.f;

       const btVector3& contactPosWorld = contactPoint.m_frictionPositionWorld;

       btVector3 rel_pos1 = contactPosWorld - contactPoint.m_body0->getCenterOfMassPosition(); 
       btVector3 rel_pos2 = contactPosWorld - contactPoint.m_body1->getCenterOfMassPosition();
       btScalar maxImpulse  = contactPoint.m_maxImpulse;
       btVector3 vel1 = contactPoint.m_body0->getVelocityInLocalPoint(rel_pos1);
       btVector3 vel2 = contactPoint.m_body1->getVelocityInLocalPoint(rel_pos2);
       btVector3 vel = vel1 - vel2;

       btScalar vrel =;

       // calculate j that moves us to zero relative velocity
       j1 = -vrel * contactPoint.m_jacDiagABInv;
       btSetMin(j1, maxImpulse);
       btSetMax(j1, -maxImpulse);

       return j1;

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

btRigidBody s_fixedObject(0, 0, 0) [static]

Definition at line 518 of file btRaycastVehicle.cpp.