Description

Class defining the Bullet geometric model for collision detection.

#include <ChCollisionModelBullet.h>

Inherits chrono::ChCollisionModelImpl.

Public Member Functions

 ChCollisionModelBullet (ChCollisionModel *collision_model)
 
virtual ChAABB GetBoundingBox () const override
 Returns the axis aligned bounding box (AABB) of the collision model. More...
 
float GetEnvelope ()
 Return the outward safe margin.
 
float GetSafeMargin ()
 Return the inward safe margin.
 
virtual void SyncPosition () override
 Sets the position and orientation of the collision model as the current position of the corresponding ChContactable.
 
bool SetSphereRadius (double coll_radius, double out_envelope)
 If the collision shape is a sphere, resize it and return true (if no sphere is found in this collision shape, return false). More...
 

Protected Member Functions

void Populate ()
 Populate the collision system with the collision shapes defined in this model.
 
virtual void OnFamilyChange (short int family_group, short int family_mask) override
 Additional operations to be performed on a change in collision family.
 
void injectShape (std::shared_ptr< ChCollisionShape > shape, std::shared_ptr< cbtCollisionShape > bt_shape, const ChFrame<> &frame)
 
void injectPath2D (std::shared_ptr< ChCollisionShapePath2D > shape_path, const ChFrame<> &frame)
 
void injectConvexHull (std::shared_ptr< ChCollisionShapeConvexHull > shape_hull, const ChFrame<> &frame)
 
void injectTriangleMesh (std::shared_ptr< ChCollisionShapeTriangleMesh > shape_trimesh, const ChFrame<> &frame)
 
void injectTriangleProxy (std::shared_ptr< ChCollisionShapeMeshTriangle > shape_triangle)
 
void injectSegmentProxy (std::shared_ptr< ChCollisionShapeSegment > shape_seg)
 
cbtCollisionObject * GetBulletObject ()
 
cbtScalar GetSuggestedFullMargin ()
 

Protected Attributes

std::unique_ptr< cbtCollisionObject > bt_collision_object
 Bullet collision object containing Bullet geometries.
 
std::shared_ptr< cbtCompoundShape > bt_compound_shape
 compound for models with more than one shape
 
std::vector< std::shared_ptr< cbtCollisionShape > > m_bt_shapes
 list of Bullet collision shapes in model
 
std::vector< std::shared_ptr< ChCollisionShape > > m_shapes
 extended list of collision shapes
 

Friends

class ChCollisionSystemBullet
 
class ChCollisionSystemBulletMulticore
 
class chrono::fea::ChContactSurfaceMesh
 

Member Function Documentation

◆ GetBoundingBox()

ChAABB chrono::ChCollisionModelBullet::GetBoundingBox ( ) const
overridevirtual

Returns the axis aligned bounding box (AABB) of the collision model.

Note that SyncPosition() should be invoked before calling this.

◆ SetSphereRadius()

bool chrono::ChCollisionModelBullet::SetSphereRadius ( double  coll_radius,
double  out_envelope 
)

If the collision shape is a sphere, resize it and return true (if no sphere is found in this collision shape, return false).

It can also change the outward envelope; the inward margin is automatically the radius of the sphere.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/collision/bullet/ChCollisionModelBullet.h
  • /builds/uwsbel/chrono/src/chrono/collision/bullet/ChCollisionModelBullet.cpp