VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtCollisionShapeManager Class Reference

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
 

Member Typedef Documentation

Constructor & Destructor Documentation

DtCollisionShapeManager::DtCollisionShapeManager ( )
virtual DtCollisionShapeManager::~DtCollisionShapeManager ( )
virtual

Member Function Documentation

virtual void DtCollisionShapeManager::addShapeFromObject ( btCollisionObject objectPtr)
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 void DtCollisionShapeManager::removeObject ( const btCollisionObject objectPtr)
virtual

Remove the object from tracking, and track changes.

virtual DtCollisionShapeId DtCollisionShapeManager::idForShape ( const btCollisionShape *  shapePtr)
virtual

Returns the ID for the specified shape ptr if it is tracked.

Returns
0 for an untracked shape.
virtual DtBvhTriangleMeshShape::Ptr DtCollisionShapeManager::shapeForId ( DtCollisionShapeId  id)
virtual
Returns
A tracked shape pointer corresponding to the provided ID. Null returned if this ID is not available.
void DtCollisionShapeManager::pruneDeletedShapes ( )
protected

Member Data Documentation

DtCollisionShapeId DtCollisionShapeManager::myNextId = 1
protected
std::unordered_map<DtCollisionShapeId, DtShapeWeakPtr> DtCollisionShapeManager::myTrackedShapes
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)