Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
33 m_btConvexTriangleCallback(ci.m_dispatcher1, body0Wrap, body1Wrap, isSwapped),
34 m_isSwapped(isSwapped)
77 BT_PROFILE(
"btConvexTriangleCallback::processTriangle");
146 colAlgo->~btCollisionAlgorithm();
168 btVector3 extra(extraMargin, extraMargin, extraMargin);
181 BT_PROFILE(
"btConvexConcaveCollisionAlgorithm::processCollision");
214 if (queryVertices.
size())
220 for (
int v = 0; v < queryVertices.
size(); v++)
228 if (sdfShape->
queryPoint(vtxInSdf, dist, normalLocal))
239 vtxWorldSpace -= sphere->
getRadius() * normal;
241 resultOut->
addContactPoint(normal, vtxWorldSpace - normal * dist, dist);
284 if (squareMot0 < convexbody->getCcdSquareMotionThreshold())
307 : m_ccdSphereFromTrans(from),
308 m_ccdSphereToTrans(to),
309 m_ccdSphereRadius(ccdSphereRadius),
310 m_hitFraction(hitFraction)
314 virtual void processTriangle(
btVector3* triangle,
int partId,
int triangleIndex)
333 ident, ident, castResult))
348 rayAabbMin -=
btVector3(ccdRadius0, ccdRadius0, ccdRadius0);
349 rayAabbMax +=
btVector3(ccdRadius0, ccdRadius0, ccdRadius0);
352 LocalTriangleSphereCastCallback raycastCallback(convexFromLocal, convexToLocal,
369 return raycastCallback.m_hitFraction;
The btPolyhedralConvexShape is an internal interface class for polyhedral convex shapes.
btPersistentManifold * m_manifoldPtr
virtual void setShapeIdentifiersB(int partId1, int index1)
btCollisionObject can be used to manage collision detection objects.
btManifoldResult * m_resultOut
virtual ~btConvexConcaveCollisionAlgorithm()
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
The btConcaveShape class provides an interface for non-moving (static) concave shapes.
const btDispatcherInfo * m_dispatchInfoPtr
const btCollisionObject * getBody0Internal() const
void setBody1Wrap(const btCollisionObjectWrapper *obj1Wrap)
btConvexConcaveCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped)
const btCollisionObjectWrapper * m_convexBodyWrap
virtual int getDebugMode() const =0
class btIDebugDraw * m_debugDraw
bool TestTriangleAgainstAabb2(const btVector3 *vertices, const btVector3 &aabbMin, const btVector3 &aabbMax)
conservative test for overlap between triangle and aabb
virtual void getAllContactManifolds(btManifoldArray &manifoldArray)
const btTransform & getWorldTransform() const
void setHitFraction(btScalar hitFraction)
btSubsimplexConvexCast implements Gino van den Bergens' paper "Ray Casting against bteral Convex Obje...
virtual void freeCollisionAlgorithm(void *ptr)=0
btCollisionAlgorithm is an collision interface that is compatible with the Broadphase and btDispatche...
virtual btPersistentManifold * getNewManifold(const btCollisionObject *b0, const btCollisionObject *b1)=0
const btCollisionObjectWrapper * getBody1Wrap() const
btTransform & getWorldTransform()
virtual void getVertex(int i, btVector3 &vtx) const =0
RayResult stores the closest result alternatively, add a callback method to decide about closest/all ...
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
virtual ~btConvexTriangleCallback()
btVoronoiSimplexSolver is an implementation of the closest point distance algorithm from a 1-4 points...
void setBody0Wrap(const btCollisionObjectWrapper *obj0Wrap)
btManifoldResult is a helper class to manage contact results.
virtual void releaseManifold(btPersistentManifold *manifold)=0
const btCollisionShape * getCollisionShape() const
void setMax(const btVector3 &other)
Set each element to the max of the current values and the values of another btVector3.
virtual void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const =0
getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t.
const btCollisionObjectWrapper * m_triBodyWrap
const btTransform & getInterpolationWorldTransform() const
virtual int getNumVertices() const =0
bool queryPoint(const btVector3 &ptInSDF, btScalar &distOut, btVector3 &normal)
The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTrian...
btScalar calculateTimeOfImpact(btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const =0
virtual void processTriangle(btVector3 *triangle, int partId, int triangleIndex)
const btCollisionObject * getCollisionObject() const
const btCollisionObjectWrapper * getBody0Wrap() const
The btSphereShape implements an implicit sphere, centered around a local origin with radius.
btVector3 can be used to represent 3D points and vectors.
btConvexTriangleCallback(btDispatcher *dispatcher, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped)
virtual btCollisionAlgorithm * findAlgorithm(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, btPersistentManifold *sharedManifold, ebtDispatcherQueryType queryType)=0
void setPersistentManifold(btPersistentManifold *manifoldPtr)
btDispatcher * m_dispatcher1
void setBodies(const btCollisionObject *body0, const btCollisionObject *body1)
virtual void drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color)=0
virtual void processCollision(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape...
void setMin(const btVector3 &other)
Set each element to the min of the current values and the values of another btVector3.
btScalar getHitFraction() const
const btVector3 & getAabbMax() const
btConvexTriangleCallback m_btConvexTriangleCallback
virtual bool calcTimeOfImpact(const btTransform &fromA, const btTransform &toA, const btTransform &fromB, const btTransform &toB, CastResult &result)
SimsimplexConvexCast calculateTimeOfImpact calculates the time of impact+normal for the linear cast (...
void refreshContactPoints()
virtual void clearManifold(btPersistentManifold *manifold)=0
void setTimeStepAndCounters(btScalar collisionMarginTriangle, const btDispatcherInfo &dispatchInfo, const btCollisionObjectWrapper *convexBodyWrap, const btCollisionObjectWrapper *triBodyWrap, btManifoldResult *resultOut)
This class is not enabled yet (work-in-progress) to more aggressively activate objects.
bool isPolyhedral() const
virtual void setMargin(btScalar margin)
virtual btScalar getMargin() const
btScalar getCcdSweptSphereRadius() const
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth)
void push_back(const T &_Val)
virtual void setShapeIdentifiersA(int partId0, int index0)
setShapeIdentifiersA/B provides experimental support for per-triangle material / custom material comb...
const btVector3 & getAabbMin() const
btDispatcher * m_dispatcher
btVector3 & safeNormalize()
btScalar m_closestPointDistanceThreshold
int size() const
return the number of elements in the array
const btCollisionShape * getCollisionShape() const
btScalar getRadius() const
btScalar m_collisionMarginTriangle