![]() |
VR-Forces Developer's Guide
|
This class tracks collision shapes, assigns them IDs and keeps weak pointers to the shapes so they can be looked up by ID later.
Public Member Functions | |
| DtCollisionShapeManager () | |
| virtual | ~DtCollisionShapeManager () |
| virtual void | addShapeFromObject (btCollisionObject *objectPtr) |
| virtual void | removeObject (const btCollisionObject *objectPtr) |
| virtual DtCollisionShapeId | idForShape (const btCollisionShape *shapePtr) |
| virtual DtBvhTriangleMeshShape::Ptr | shapeForId (DtCollisionShapeId id) |
Protected Types | |
| using | DtShapeWeakPtr = std::weak_ptr< DtBvhTriangleMeshShape > |
Protected Member Functions | |
| void | pruneDeletedShapes () |
Protected Attributes | |
| DtCollisionShapeId | myNextId = 1 |
| std::unordered_map < DtCollisionShapeId, DtShapeWeakPtr > | myTrackedShapes |
|
protected |
| DtCollisionShapeManager::DtCollisionShapeManager | ( | ) |
|
virtual |
|
virtual |
If the shape that is referenced by this object is not already tracked, add it, and track that this object is using the shape.
|
virtual |
Remove the object from tracking, and track changes.
|
virtual |
Returns the ID for the specified shape ptr if it is tracked.
|
virtual |
|
protected |
|
protected |
|
protected |