Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm Class Reference

Supports collision between CompoundCollisionShapes and other collision shapes. More...

#include <tesseract_compound_collision_algorithm.h>

Inheritance diagram for tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm:
Inheritance graph
[legend]

Classes

struct  CreateFunc
 
struct  SwappedCreateFunc
 

Public Member Functions

btScalar calculateTimeOfImpact (btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut) override
 
void getAllContactManifolds (btManifoldArray &manifoldArray) override
 
btCollisionAlgorithm * getChildAlgorithm (int n) const
 
TesseractCompoundCollisionAlgorithmoperator= (const TesseractCompoundCollisionAlgorithm &)=default
 
TesseractCompoundCollisionAlgorithmoperator= (TesseractCompoundCollisionAlgorithm &&)=default
 
void processCollision (const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut) override
 
 TesseractCompoundCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped)
 
 TesseractCompoundCollisionAlgorithm (const TesseractCompoundCollisionAlgorithm &)=default
 
 TesseractCompoundCollisionAlgorithm (TesseractCompoundCollisionAlgorithm &&)=default
 
 ~TesseractCompoundCollisionAlgorithm () override
 

Protected Member Functions

void preallocateChildAlgorithms (const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap)
 
void removeChildAlgorithms ()
 

Protected Attributes

btAlignedObjectArray< btCollisionAlgorithm * > m_childCollisionAlgorithms
 
int m_compoundShapeRevision
 
bool m_isSwapped
 
bool m_ownsManifold { false }
 
class btPersistentManifold * m_sharedManifold
 

Private Attributes

btManifoldArray manifoldArray
 
btNodeStack stack2
 

Detailed Description

Supports collision between CompoundCollisionShapes and other collision shapes.

The original implementation would check all collision objects before exiting the bvh of the compound shape. The original code had a callback, but it only passed in the collision shape and no the collision object which is where the user data is located. This was modifed to check if collision is done for the contact test type FIRST during the internal broadphase of the compound shapes and exit early.

Note: This could be removed in the future but the callback need to be modifed to accept the collision object along with the collision shape. I don't believe this will be an issue since all of the other callback in Bullet accept both.

Definition at line 52 of file tesseract_compound_collision_algorithm.h.

Constructor & Destructor Documentation

◆ TesseractCompoundCollisionAlgorithm() [1/3]

tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::TesseractCompoundCollisionAlgorithm ( const btCollisionAlgorithmConstructionInfo &  ci,
const btCollisionObjectWrapper *  body0Wrap,
const btCollisionObjectWrapper *  body1Wrap,
bool  isSwapped 
)

Definition at line 40 of file tesseract_compound_collision_algorithm.cpp.

◆ ~TesseractCompoundCollisionAlgorithm()

tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::~TesseractCompoundCollisionAlgorithm ( )
override

Definition at line 105 of file tesseract_compound_collision_algorithm.cpp.

◆ TesseractCompoundCollisionAlgorithm() [2/3]

tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::TesseractCompoundCollisionAlgorithm ( const TesseractCompoundCollisionAlgorithm )
default

◆ TesseractCompoundCollisionAlgorithm() [3/3]

tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::TesseractCompoundCollisionAlgorithm ( TesseractCompoundCollisionAlgorithm &&  )
default

Member Function Documentation

◆ calculateTimeOfImpact()

btScalar tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::calculateTimeOfImpact ( btCollisionObject *  body0,
btCollisionObject *  body1,
const btDispatcherInfo &  dispatchInfo,
btManifoldResult *  resultOut 
)
override

Definition at line 393 of file tesseract_compound_collision_algorithm.cpp.

◆ getAllContactManifolds()

void tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::getAllContactManifolds ( btManifoldArray &  manifoldArray)
inlineoverride

Definition at line 94 of file tesseract_compound_collision_algorithm.h.

◆ getChildAlgorithm()

btCollisionAlgorithm* tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::getChildAlgorithm ( int  n) const
inline

Definition at line 82 of file tesseract_compound_collision_algorithm.h.

◆ operator=() [1/2]

TesseractCompoundCollisionAlgorithm& tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::operator= ( const TesseractCompoundCollisionAlgorithm )
default

◆ operator=() [2/2]

TesseractCompoundCollisionAlgorithm& tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::operator= ( TesseractCompoundCollisionAlgorithm &&  )
default

◆ preallocateChildAlgorithms()

void tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::preallocateChildAlgorithms ( const btCollisionObjectWrapper *  body0Wrap,
const btCollisionObjectWrapper *  body1Wrap 
)
protected

Definition at line 55 of file tesseract_compound_collision_algorithm.cpp.

◆ processCollision()

void tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::processCollision ( const btCollisionObjectWrapper *  body0Wrap,
const btCollisionObjectWrapper *  body1Wrap,
const btDispatcherInfo &  dispatchInfo,
btManifoldResult *  resultOut 
)
override

btCompoundShape might have changed: /make sure the internal child collision algorithm caches are still valid

clear and update all

we need to refresh all contact manifolds note that we should actually recursively traverse all children, btCompoundShape can nested more then 1 level deep so we should add a 'refreshManifolds' in the btCollisionAlgorithm

Definition at line 271 of file tesseract_compound_collision_algorithm.cpp.

◆ removeChildAlgorithms()

void tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::removeChildAlgorithms ( )
protected

Definition at line 92 of file tesseract_compound_collision_algorithm.cpp.

Member Data Documentation

◆ m_childCollisionAlgorithms

btAlignedObjectArray<btCollisionAlgorithm*> tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::m_childCollisionAlgorithms
protected

Definition at line 58 of file tesseract_compound_collision_algorithm.h.

◆ m_compoundShapeRevision

int tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::m_compoundShapeRevision
protected

Definition at line 64 of file tesseract_compound_collision_algorithm.h.

◆ m_isSwapped

bool tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::m_isSwapped
protected

Definition at line 59 of file tesseract_compound_collision_algorithm.h.

◆ m_ownsManifold

bool tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::m_ownsManifold { false }
protected

Definition at line 62 of file tesseract_compound_collision_algorithm.h.

◆ m_sharedManifold

class btPersistentManifold* tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::m_sharedManifold
protected

Definition at line 61 of file tesseract_compound_collision_algorithm.h.

◆ manifoldArray

btManifoldArray tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::manifoldArray
private

Definition at line 55 of file tesseract_compound_collision_algorithm.h.

◆ stack2

btNodeStack tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm::stack2
private

Definition at line 54 of file tesseract_compound_collision_algorithm.h.


The documentation for this class was generated from the following files:


tesseract_collision
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:01:53