File mechanics/src/collision/bullet/SiconosBulletCollisionManager.hpp#
Go to the source code of this file
Definition of a Bullet-based interaction handler for contact detection.
Enums
Functions
-
DEFINE_SPTR(SiconosBulletCollisionManager_impl)#
-
struct SiconosBulletOptions#
Public Functions
-
SiconosBulletOptions()#
Public Members
-
int dimension#
-
double contactBreakingThreshold#
-
double contactProcessingThreshold#
-
double worldScale#
-
bool useAxisSweep3#
-
bool clearOverlappingPairCache#
-
unsigned int perturbationIterations#
-
unsigned int minimumPointsPerturbationThreshold#
-
bool enableSatConvex#
-
bool enablePolyhedralContactClipping#
-
double Depth2D#
Protected Functions
-
ACCEPT_SERIALIZATION(SiconosBulletOptions)#
-
SiconosBulletOptions()#
-
struct SiconosBulletStatistics#
Public Functions
-
inline SiconosBulletStatistics()#
Public Members
-
int new_interactions_created#
-
int existing_interactions_processed#
-
int interaction_warnings#
-
int interaction_destroyed#
Protected Functions
-
ACCEPT_SERIALIZATION(SiconosBulletStatistics)#
-
inline SiconosBulletStatistics()#
-
class SiconosBulletCollisionManager : public SiconosCollisionManager
Public Functions
-
SiconosBulletCollisionManager()#
-
SiconosBulletCollisionManager(const SiconosBulletOptions &options)#
-
virtual ~SiconosBulletCollisionManager()#
-
virtual SP::StaticBody addStaticBody(SP::SiconosContactorSet cs, SP::SiconosVector position = SP::SiconosVector(), int number = 0)
Add a static body in the collision detector.
-
virtual void removeStaticBody(const SP::StaticBody &body)
Remove a body from the collision detector.
-
virtual void removeBody(const SP::SecondOrderDS &body)
Remove a body from the collision detector.
This must be done after removing a body from the NonSmoothDynamicalSystem otherwise contact will occur with a non-graph body which results in failure.
-
virtual std::vector<SP::SiconosCollisionQueryResult> lineIntersectionQuery(const SiconosVector &start, const SiconosVector &end, bool closestOnly = false, bool sorted = true)
Perform an intersection test on all shapes in the contactors and return a vector of all results, ordered by distance from start.
- Parameters:
start – The starting point of the line segment in inertial frame (world) coordinates.
end – The ending point of the line segment in inertial frame (world) coordinates.
closestOnly – If true, indicates only interested in first result closest to half-space boundary, max size of returned vector = 1.
sorted – If true, results are sorted by distance.
- Returns:
A vector of SiconosCollisionQueryResult that contain information about the query results.
-
void clearOverlappingPairCache()#
-
inline const SiconosBulletOptions &options() const#
-
inline const SiconosBulletStatistics &statistics() const#
-
inline void resetStatistics()#
-
inline void useEqualityConstraints(bool choice = true)
Set the usage of equality constraints.
When the number of objects is huge as in granular material, the usage of equality constraint breaks scalability. This have to be fixed.
- Parameters:
choice – a boolean, default is True.
Protected Functions
-
ACCEPT_SERIALIZATION(SiconosBulletCollisionManager)#
-
void initialize_impl()#
-
virtual SP::BulletR makeBulletR(SP::RigidBodyDS ds1, SP::SiconosShape shape1, SP::RigidBodyDS ds2, SP::SiconosShape shape2, const btManifoldPoint&)#
Provided so that creation of collision points can be overridden.
See modify_normals.py in examples/Mechanics/Hacks
-
virtual SP::Bullet5DR makeBullet5DR(SP::RigidBodyDS ds1, SP::SiconosShape shape1, SP::RigidBodyDS ds2, SP::SiconosShape shape2, const btManifoldPoint&)#
Provided so that creation of collision points can be overridden.
See modify_normals.py in examples/Mechanics/Hacks
Protected Attributes
-
bool _with_equality_constraints#
-
SiconosBulletOptions _options#
-
SiconosBulletStatistics _stats#
Protected Static Functions
-
static bool bulletContactClear(void *userPersistentData)#
-
static bool bulletContactAddedCallback(btManifoldPoint &cp, const btCollisionObjectWrapper *colObj0Wrap, int partId0, int index0, const btCollisionObjectWrapper *colObj1Wrap, int partId1, int index1)#
Protected Static Attributes
-
static Simulation *gSimulation#
-
SiconosBulletCollisionManager()#