62#ifdef TRI_COLLISION_PROFILING
159#ifdef TRI_COLLISION_PROFILING
162float btGImpactCollisionAlgorithm::getAverageTreeCollisionTime()
164 return btGImpactBoxSet::getAverageTreeCollisionTime();
168float btGImpactCollisionAlgorithm::getAverageTriangleCollisionTime()
222 algor->~btCollisionAlgorithm();
256 int i =
shape0->getNumChildShapes();
262 int j =
shape1->getNumChildShapes();
299 int i =
shape0->getNumChildShapes();
322 shape0->lockChildShapes();
323 shape1->lockChildShapes();
337 if (
tri0.overlap_test_conservative(
tri1))
343 shape0->unlockChildShapes();
344 shape1->unlockChildShapes();
360 shape0->lockChildShapes();
361 shape1->lockChildShapes();
374#ifdef TRI_COLLISION_PROFILING
382 ptri0.buildTriPlane();
383 ptri1.buildTriPlane();
401#ifdef TRI_COLLISION_PROFILING
406 shape0->unlockChildShapes();
407 shape1->unlockChildShapes();
449 if (
pairset.size() == 0)
return;
457#ifdef BULLET_TRIANGLE_COLLISION
468 shape0->lockChildShapes();
469 shape1->lockChildShapes();
506 shape0->unlockChildShapes();
507 shape1->unlockChildShapes();
532#ifdef GIMPACT_VS_PLANE_COLLISION
550 else if (
shape1->isConcave())
567 shape0->lockChildShapes();
626 shape0->unlockChildShapes();
636 int i =
shape1->getNumChildShapes();
691 shape0->lockChildShapes();
723 shape0->unlockChildShapes();
@ GIMPACT_SHAPE_PROXYTYPE
Used for GIMPACT Trimesh integration.
@ MAX_BROADPHASE_COLLISION_TYPES
@ CONST_GIMPACT_TRIMESH_SHAPE
@ CONST_GIMPACT_TRIMESH_SHAPE_PART
const T & btMax(const T &a, const T &b)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
virtual const btCollisionShape * getChildShape(int index)
GIM_ShapeRetriever * m_parent
virtual ~ChildShapeRetriever()
virtual btCollisionShape * getChildShape(int index)
virtual ~TriangleShapeRetriever()
virtual btCollisionShape * getChildShape(int index)
Retrieving shapes shapes.
TetraShapeRetriever m_tetra_retriever
GIM_ShapeRetriever(const btGImpactShapeInterface *gim_shape)
ChildShapeRetriever * m_current_retriever
const btCollisionShape * getChildShape(int index)
btTetrahedronShapeEx m_tetrashape
btTriangleShapeEx m_trishape
TriangleShapeRetriever m_tri_retriever
const btGImpactShapeInterface * m_gim_shape
ChildShapeRetriever m_child_retriever
void increment_margin(btScalar margin)
This class is not enabled yet (work-in-progress) to more aggressively activate objects.
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
The btClock is a portable basic clock that measures accurate time in seconds, use for profiling.
void reset()
Resets the initial reference time.
btCollisionAlgorithm is an collision interface that is compatible with the Broadphase and btDispatche...
btDispatcher * m_dispatcher
virtual void processCollision(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)=0
btCollisionDispatcher supports algorithms that handle ConvexConvex and ConvexConcave collision pairs.
btCollisionObject can be used to manage collision detection objects.
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
The btCompoundShape allows to store multiple other btCollisionShapes This allows for moving concave c...
The btConcaveShape class provides an interface for non-moving (static) concave shapes.
virtual void freeCollisionAlgorithm(void *ptr)=0
Collision Algorithm for GImpact Shapes.
btPersistentManifold * getLastManifold()
void gimpact_vs_concave(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btGImpactShapeInterface *shape0, const btConcaveShape *shape1, bool swapped)
void gimpact_vs_shape_find_pairs(const btTransform &trans0, const btTransform &trans1, const btGImpactShapeInterface *shape0, const btCollisionShape *shape1, btAlignedObjectArray< int > &collided_primitives)
void setFace0(int value)
Accessor/Mutator pairs for Part and triangleID.
btCollisionAlgorithm * newAlgorithm(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap)
void collide_gjk_triangles(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btGImpactMeshShapePart *shape0, const btGImpactMeshShapePart *shape1, const int *pairs, int pair_count)
Collision routines.
btCollisionAlgorithm * m_convex_algorithm
const btDispatcherInfo * m_dispatchInfo
void checkConvexAlgorithm(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap)
void gimpact_vs_gimpact(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btGImpactShapeInterface *shape0, const btGImpactShapeInterface *shape1)
Collides two gimpact shapes.
void gimpact_vs_compoundshape(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btGImpactShapeInterface *shape0, const btCompoundShape *shape1, bool swapped)
btManifoldResult * internalGetResultOut()
btScalar calculateTimeOfImpact(btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
void gimpact_vs_gimpact_find_pairs(const btTransform &trans0, const btTransform &trans1, const btGImpactShapeInterface *shape0, const btGImpactShapeInterface *shape1, btPairSet &pairset)
btGImpactCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap)
void gimpacttrimeshpart_vs_plane_collision(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btGImpactMeshShapePart *shape0, const btStaticPlaneShape *shape1, bool swapped)
void gimpact_vs_shape(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btGImpactShapeInterface *shape0, const btCollisionShape *shape1, bool swapped)
btPersistentManifold * m_manifoldPtr
virtual ~btGImpactCollisionAlgorithm()
btManifoldResult * m_resultOut
void convex_vs_convex_collision(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btCollisionShape *shape0, const btCollisionShape *shape1)
void checkManifold(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap)
static void registerAlgorithm(btCollisionDispatcher *dispatcher)
Use this function for register the algorithm externally.
void collide_sat_triangles(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btGImpactMeshShapePart *shape0, const btGImpactMeshShapePart *shape1, const int *pairs, int pair_count)
virtual void processCollision(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
void shape_vs_shape_collision(const btCollisionObjectWrapper *body0, const btCollisionObjectWrapper *body1, const btCollisionShape *shape0, const btCollisionShape *shape1)
void addContactPoint(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btVector3 &point, const btVector3 &normal, btScalar distance)
This class manages a sub part of a mesh supplied by the btStridingMeshInterface interface.
This class manages a mesh supplied by the btStridingMeshInterface interface.
int getMeshPartCount() const
static void find_collision(const btGImpactQuantizedBvh *boxset1, const btTransform &trans1, const btGImpactQuantizedBvh *boxset2, const btTransform &trans2, btPairSet &collision_pairs)
Base class for gimpact shapes.
virtual btCollisionShape * getChildShape(int index)=0
Gets the children.
virtual bool needsRetrieveTriangles() const =0
Determines if this shape has triangles.
virtual void getBulletTetrahedron(int prim_index, btTetrahedronShapeEx &tetrahedron) const =0
virtual void getBulletTriangle(int prim_index, btTriangleShapeEx &triangle) const =0
virtual bool needsRetrieveTetrahedrons() const =0
Determines if this shape has tetrahedrons.
const btCollisionObjectWrapper * body1Wrap
virtual void processTriangle(btVector3 *triangle, int partId, int triangleIndex)
btGImpactCollisionAlgorithm * algorithm
const btGImpactShapeInterface * gimpactshape0
const btCollisionObjectWrapper * body0Wrap
btManifoldResult is a helper class to manage contact results.
virtual void setShapeIdentifiersA(int partId0, int index0)
setShapeIdentifiersA/B provides experimental support for per-triangle material / custom material comb...
void setBody0Wrap(const btCollisionObjectWrapper *obj0Wrap)
const btCollisionObjectWrapper * getBody1Wrap() const
void setBody1Wrap(const btCollisionObjectWrapper *obj1Wrap)
virtual void setShapeIdentifiersB(int partId1, int index1)
void refreshContactPoints()
const btCollisionObjectWrapper * getBody0Wrap() const
virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth)
Class for accessing the plane equation.
void get_plane_equation_transformed(const btTransform &trans, btVector4 &equation) const
void get_plane_equation(btVector4 &equation)
btPlaneShape(const btVector3 &v, float f)
The btStaticPlaneShape simulates an infinite non-moving (static) collision plane.
Helper class for tetrahedrons.
The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTrian...
Helper class for colliding Bullet Triangle Shapes.
btVector3 can be used to represent 3D points and vectors.
btScalar dot(const btVector3 &v) const
Return the dot product.
const btCollisionShape * getCollisionShape() const
const btCollisionObject * getCollisionObject() const
const btTransform & getWorldTransform() const