DART 6.6.2
|
#include <BulletCollisionGroup.hpp>
Public Member Functions | |
BulletCollisionGroup (const CollisionDetectorPtr &collisionDetector) | |
Constructor. | |
virtual | ~BulletCollisionGroup ()=default |
Destructor. | |
CollisionDetectorPtr | getCollisionDetector () |
Return collision detection engine associated with this CollisionGroup. | |
ConstCollisionDetectorPtr | getCollisionDetector () const |
Return (const) collision detection engine associated with this CollisionGroup. | |
void | addShapeFrame (const dynamics::ShapeFrame *shapeFrame) |
Add a ShapeFrame to this CollisionGroup. | |
void | addShapeFrames (const std::vector< const dynamics::ShapeFrame * > &shapeFrames) |
Add ShapeFrames to this CollisionGroup. | |
template<typename... Others> | |
void | addShapeFramesOf (const dynamics::ShapeFrame *shapeFrame, const Others *... others) |
Add a ShapeFrame, and also add ShapeFrames of other various objects. | |
template<typename... Others> | |
void | addShapeFramesOf (const std::vector< const dynamics::ShapeFrame * > &shapeFrames, const Others *... others) |
Add ShapeFrames, and also add ShapeFrames of other various objects. | |
template<typename... Others> | |
void | addShapeFramesOf (const CollisionGroup *otherGroup, const Others *... others) |
Add ShapeFrames of other CollisionGroup, and also add another ShapeFrames of other various objects. | |
template<typename... Others> | |
void | addShapeFramesOf (const dynamics::BodyNode *bodyNode, const Others *... others) |
Add ShapeFrames of BodyNode, and also add another ShapeFrames of other various objects. | |
template<typename... Others> | |
void | addShapeFramesOf (const dynamics::MetaSkeleton *skeleton, const Others *... others) |
Add ShapeFrames of MetaSkeleton, and also add another ShapeFrames of other various objects. | |
void | addShapeFramesOf () |
Do nothing. | |
void | removeShapeFrame (const dynamics::ShapeFrame *shapeFrame) |
Remove a ShapeFrame from this CollisionGroup. | |
void | removeShapeFrames (const std::vector< const dynamics::ShapeFrame * > &shapeFrames) |
Remove ShapeFrames from this CollisionGroup. | |
template<typename... Others> | |
void | removeShapeFramesOf (const dynamics::ShapeFrame *shapeFrame, const Others *... others) |
Remove a ShapeFrame, and also remove ShapeFrames of other various objects. | |
template<typename... Others> | |
void | removeShapeFramesOf (const std::vector< const dynamics::ShapeFrame * > &shapeFrames, const Others *... others) |
Remove ShapeFrames, and also remove ShapeFrames of other various objects. | |
template<typename... Others> | |
void | removeShapeFramesOf (const CollisionGroup *otherGroup, const Others *... others) |
Remove ShapeFrames of other CollisionGroup, and also remove another ShapeFrames of other various objects. | |
template<typename... Others> | |
void | removeShapeFramesOf (const dynamics::BodyNode *bodyNode, const Others *... others) |
Remove ShapeFrames of BodyNode, and also remove another ShapeFrames of other various objects. | |
template<typename... Others> | |
void | removeShapeFramesOf (const dynamics::MetaSkeleton *skeleton, const Others *... others) |
Remove ShapeFrames of MetaSkeleton, and also remove another ShapeFrames of other various objects. | |
void | removeShapeFramesOf () |
Do nothing. | |
void | removeAllShapeFrames () |
Remove all the ShapeFrames in this CollisionGroup. | |
bool | hasShapeFrame (const dynamics::ShapeFrame *shapeFrame) const |
Return true if this CollisionGroup contains shapeFrame. | |
std::size_t | getNumShapeFrames () const |
Return number of ShapeFrames added to this CollisionGroup. | |
const dynamics::ShapeFrame * | getShapeFrame (std::size_t index) const |
Get the ShapeFrame corresponding to the given index. | |
bool | collide (const CollisionOption &option=CollisionOption(false, 1u, nullptr), CollisionResult *result=nullptr) |
Perform collision check within this CollisionGroup. | |
bool | collide (CollisionGroup *otherGroup, const CollisionOption &option=CollisionOption(false, 1u, nullptr), CollisionResult *result=nullptr) |
Perform collision check with other CollisionGroup. | |
double | distance (const DistanceOption &option=DistanceOption(false, 0.0, nullptr), DistanceResult *result=nullptr) |
Get the minimum signed distance between the Shape pairs in this CollisionGroup. | |
double | distance (CollisionGroup *otherGroup, const DistanceOption &option=DistanceOption(false, 0.0, nullptr), DistanceResult *result=nullptr) |
Get the minimum signed distance between the Shape pairs where a pair consist of two shapes from each groups (one from this CollisionGroup and one from otherGroup). | |
Protected Member Functions | |
void | initializeEngineData () override |
Initialize the collision detection engine data such as broadphase algorithm. | |
void | addCollisionObjectToEngine (CollisionObject *object) override |
Add CollisionObject to the collision detection engine. | |
void | addCollisionObjectsToEngine (const std::vector< CollisionObject * > &collObjects) override |
Add CollisionObjects to the collision detection engine. | |
void | removeCollisionObjectFromEngine (CollisionObject *object) override |
Remove CollisionObject from the collision detection engine. | |
void | removeAllCollisionObjectsFromEngine () override |
Remove all the CollisionObjects from the collision detection engine. | |
void | updateCollisionGroupEngineData () override |
Update the collision detection engine data such as broadphase algorithm. | |
btCollisionWorld * | getBulletCollisionWorld () |
Return Bullet collision world. | |
const btCollisionWorld * | getBulletCollisionWorld () const |
Return Bullet collision world. | |
void | updateEngineData () |
Update engine data. | |
Protected Attributes | |
std::unique_ptr< btBroadphaseInterface > | mBulletProadphaseAlg |
Bullet broad-phase algorithm. | |
std::unique_ptr< btCollisionConfiguration > | mBulletCollisionConfiguration |
Bullet collision configuration. | |
std::unique_ptr< btDispatcher > | mBulletDispatcher |
Bullet collision dispatcher. | |
std::unique_ptr< btCollisionWorld > | mBulletCollisionWorld |
Bullet collision world. | |
CollisionDetectorPtr | mCollisionDetector |
Collision detector. | |
std::vector< std::pair< const dynamics::ShapeFrame *, CollisionObjectPtr > > | mShapeFrameMap |
ShapeFrames and CollisionOjbects added to this CollisionGroup. | |
Friends | |
class | BulletCollisionDetector |
dart::collision::BulletCollisionGroup::BulletCollisionGroup | ( | const CollisionDetectorPtr & | collisionDetector | ) |
Constructor.
|
virtualdefault |
Destructor.
|
overrideprotectedvirtual |
Add CollisionObjects to the collision detection engine.
Implements dart::collision::CollisionGroup.
|
overrideprotectedvirtual |
Add CollisionObject to the collision detection engine.
Implements dart::collision::CollisionGroup.
|
inherited |
Add a ShapeFrame to this CollisionGroup.
|
inherited |
Add ShapeFrames to this CollisionGroup.
|
inherited |
Do nothing.
This function is for terminating the recursive variadic template function template<typename...> addShapeFramesOf().
|
inherited |
Add ShapeFrames of other CollisionGroup, and also add another ShapeFrames of other various objects.
|
inherited |
Add ShapeFrames of BodyNode, and also add another ShapeFrames of other various objects.
|
inherited |
Add ShapeFrames of MetaSkeleton, and also add another ShapeFrames of other various objects.
|
inherited |
Add a ShapeFrame, and also add ShapeFrames of other various objects.
The other various objects can be any of ShapeFrame, std::vector<ShapeFrame>, CollisionGroup, BodyNode, and Skeleton.
Note that this function adds only the ShapeFrames of each object at the moment of this function is called. The aftwerward changes of the objects does not affect on this CollisionGroup.
|
inherited |
Add ShapeFrames, and also add ShapeFrames of other various objects.
|
inherited |
Perform collision check with other CollisionGroup.
Return false if the engine type of the other CollisionGroup is different from this CollisionObject engine.
|
inherited |
Perform collision check within this CollisionGroup.
|
inherited |
Get the minimum signed distance between the Shape pairs where a pair consist of two shapes from each groups (one from this CollisionGroup and one from otherGroup).
Note that the distance between shapes within the same CollisionGroup are not accounted.
The detailed results are stored in the given DistanceResult if provided.
The results can be different by DistanceOption. By default, non-negative minimum distance (distance >= 0) is returned for all the shape pairs without computing nearest points.
|
inherited |
Get the minimum signed distance between the Shape pairs in this CollisionGroup.
The detailed results are stored in the given DistanceResult if provided.
The results can be different by DistanceOption. By default, non-negative minimum distance (distance >= 0) is returned for all the shape pairs without computing nearest points.
|
protected |
Return Bullet collision world.
|
protected |
Return Bullet collision world.
|
inherited |
Return collision detection engine associated with this CollisionGroup.
|
inherited |
Return (const) collision detection engine associated with this CollisionGroup.
|
inherited |
Return number of ShapeFrames added to this CollisionGroup.
|
inherited |
Get the ShapeFrame corresponding to the given index.
|
inherited |
Return true if this CollisionGroup contains shapeFrame.
|
overrideprotectedvirtual |
Initialize the collision detection engine data such as broadphase algorithm.
This function will be called whenever ShapeFrame is either added to or removed from this CollisionGroup.
Implements dart::collision::CollisionGroup.
|
overrideprotectedvirtual |
Remove all the CollisionObjects from the collision detection engine.
Implements dart::collision::CollisionGroup.
|
inherited |
Remove all the ShapeFrames in this CollisionGroup.
|
overrideprotectedvirtual |
Remove CollisionObject from the collision detection engine.
Implements dart::collision::CollisionGroup.
|
inherited |
Remove a ShapeFrame from this CollisionGroup.
|
inherited |
Remove ShapeFrames from this CollisionGroup.
|
inherited |
Do nothing.
This function is for terminating the recursive variadic template function template<typename...> removeShapeFramesOf().
|
inherited |
Remove ShapeFrames of other CollisionGroup, and also remove another ShapeFrames of other various objects.
|
inherited |
Remove ShapeFrames of BodyNode, and also remove another ShapeFrames of other various objects.
|
inherited |
Remove ShapeFrames of MetaSkeleton, and also remove another ShapeFrames of other various objects.
|
inherited |
Remove a ShapeFrame, and also remove ShapeFrames of other various objects.
The other various objects can be any of ShapeFrame, std::vector<ShapeFrame>, CollisionGroup, BodyNode, and Skeleton.
Note that this function removes only the ShapeFrames of each object at the moment of this function is called. The aftwerward changes of the objects does not affect on this CollisionGroup.
|
inherited |
Remove ShapeFrames, and also remove ShapeFrames of other various objects.
|
overrideprotectedvirtual |
Update the collision detection engine data such as broadphase algorithm.
This function will be called ahead of every collision checking.
Implements dart::collision::CollisionGroup.
|
protected |
Update engine data.
This function should be called before the collision detection is performed by the engine in most cases.
|
friend |
|
protected |
Bullet collision configuration.
|
protected |
Bullet collision world.
|
protected |
Bullet collision dispatcher.
|
protected |
Bullet broad-phase algorithm.
|
protectedinherited |
Collision detector.
|
protectedinherited |
ShapeFrames and CollisionOjbects added to this CollisionGroup.