101 return (plDynamicsWorldHandle)
new (mem)
btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver,collisionConfiguration);
139 plRigidBodyHandle
plCreateRigidBody(
void* user_data,
float mass, plCollisionShapeHandle cshape )
155 return (plRigidBodyHandle) body;
171 return (plCollisionShapeHandle)
new (mem)
btSphereShape(radius);
185 const int numSpheres = 2;
187 btScalar radi[numSpheres] = {radius,radius};
189 return (plCollisionShapeHandle)
new (mem)
btMultiSphereShape(positions,radi,numSpheres);
194 return (plCollisionShapeHandle)
new (mem)
btConeShape(radius,height);
233 compoundShape->addChildShape(localTrans,childShape);
240 orient[0] = orn.
getX();
241 orient[1] = orn.
getY();
242 orient[2] = orn.
getZ();
243 orient[3] = orn.
getW();
272 btVector3 scaling(cscaling[0],cscaling[1],cscaling[2]);
282 btVector3 pos(position[0],position[1],position[2]);
292 btQuaternion orn(orientation[0],orientation[1],orientation[2],orientation[3]);
319 position[0] = pos.
getX();
320 position[1] = pos.
getY();
321 position[2] = pos.
getZ();
329 orientation[0] = orn.
getX();
330 orientation[1] = orn.
getY();
331 orientation[2] = orn.
getZ();
332 orientation[3] = orn.
getW();
341 double plNearestPoints(
float p1[3],
float p2[3],
float p3[3],
float q1[3],
float q2[3],
float q3[3],
float *pa,
float *pb,
float normal[3])
358 sGjkSimplexSolver.reset();
367 btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,Solver);
plCollisionShapeHandle plNewCapsuleShape(plReal radius, plReal height)
plCollisionShapeHandle plNewConvexHullShape()
The btAxisSweep3 is an efficient implementation of the 3d axis sweep and prune broadphase.
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const =0
void plSetScaling(plCollisionShapeHandle cshape, plVector3 cscaling)
plCollisionShapeHandle plNewConeShape(plReal radius, plReal height)
ConvexPenetrationDepthSolver provides an interface for penetration depth calculation.
The btMultiSphereShape represents the convex hull of a collection of spheres.
double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3])
btDiscreteDynamicsWorld provides discrete rigid body simulation those classes replace the obsolete Cc...
The btDynamicsWorld is the interface class for several dynamics implementation, basic, discrete, parallel, and continuous etc.
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
const btScalar & getW() const
btCollisionDispatcher supports algorithms that handle ConvexConvex and ConvexConcave collision pairs...
The btSphereShape implements an implicit sphere, centered around a local origin with radius...
void plGetOrientation(plRigidBodyHandle object, plQuaternion orientation)
const btScalar & getY() const
Return the y value.
plPhysicsSdkHandle plNewBulletSdk()
Create and Delete a Physics SDK.
plCollisionShapeHandle plNewCylinderShape(plReal radius, plReal height)
const btScalar & getX() const
Return the x value.
void plDeleteShape(plCollisionShapeHandle cshape)
plRigidBodyHandle plCreateRigidBody(void *user_data, float mass, plCollisionShapeHandle cshape)
const btScalar & getZ() const
Return the z value.
virtual void addRigidBody(btRigidBody *body)=0
void plSetOpenGLMatrix(plRigidBodyHandle object, plReal *matrix)
btCollisionConfiguration allows to configure Bullet collision detection stack allocator, pool memory allocators
void plGetOpenGLMatrix(plRigidBodyHandle object, plReal *matrix)
btTransform & getWorldTransform()
virtual void setMargin(btScalar margin)
void plGetPosition(plRigidBodyHandle object, plVector3 position)
void plAddVertex(plCollisionShapeHandle cshape, plReal x, plReal y, plReal z)
#define btSimplexSolverInterface
The btConeShape implements a cone shape primitive, centered around the origin and aligned with the Y ...
void plSetOrientation(plRigidBodyHandle object, const plQuaternion orientation)
virtual void removeRigidBody(btRigidBody *body)=0
void plDeleteRigidBody(plRigidBodyHandle cbody)
const btScalar & getY() const
Return the y value.
#define btAlignedFree(ptr)
plDynamicsWorldHandle plCreateDynamicsWorld(plPhysicsSdkHandle physicsSdkHandle)
void setUserPointer(void *userPointer)
users can point to their objects, userPointer is not used by Bullet
const btScalar & getX() const
Return the x value.
The btRigidBody is the main class for rigid body objects.
MinkowskiPenetrationDepthSolver implements bruteforce penetration depth estimation.
void plStepSimulation(plDynamicsWorldHandle world, plReal timeStep)
The btRigidBodyConstructionInfo structure provides information to create a rigid body.
The btBroadphaseInterface class provides an interface to detect aabb-overlapping object pairs...
void setWorldTransform(const btTransform &worldTrans)
plCollisionShapeHandle plNewCompoundShape()
plCollisionShapeHandle plNewSphereShape(plReal radius)
virtual void setLocalScaling(const btVector3 &scaling)=0
The btSequentialImpulseConstraintSolver is a fast SIMD implementation of the Projected Gauss Seidel (...
The btBoxShape is a box primitive around the origin, its sides axis aligned with length specified by ...
btVector3 can be used to represent 3D points and vectors.
void plAddChildShape(plCollisionShapeHandle compoundShapeHandle, plCollisionShapeHandle childShapeHandle, plVector3 childPos, plQuaternion childOrn)
virtual int stepSimulation(btScalar timeStep, int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.))=0
stepSimulation proceeds the simulation over 'timeStep', units in preferably in seconds.
void plRemoveRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object)
void plSetEuler(plReal yaw, plReal pitch, plReal roll, plQuaternion orient)
EpaPenetrationDepthSolver uses the Expanding Polytope Algorithm to calculate the penetration depth be...
btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface
The btCylinderShape class implements a cylinder shape primitive, centered around the origin...
void plDeletePhysicsSdk(plPhysicsSdkHandle physicsSdk)
#define btAlignedAlloc(size, alignment)
void addPoint(const btVector3 &point, bool recalculateLocalAabb=true)
The btConvexHullShape implements an implicit convex hull of an array of vertices. ...
plCollisionShapeHandle plNewBoxShape(plReal x, plReal y, plReal z)
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
The btCompoundShape allows to store multiple other btCollisionShapes This allows for moving concave c...
void setEuler(const btScalar &yaw, const btScalar &pitch, const btScalar &roll)
Set the quaternion using Euler angles.
plMeshInterfaceHandle plNewMeshInterface()
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
void plSetPosition(plRigidBodyHandle object, const plVector3 position)
void plDeleteDynamicsWorld(plDynamicsWorldHandle world)
void plAddRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object)
btVector3 m_normalOnBInWorld
const btScalar & getZ() const
Return the z value.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
virtual void getClosestPoints(const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw, bool swapResults=false)