VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
collisionShapeManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
9 #include <unordered_map>
10 
11 class btCollisionShape;
12 class btCollisionObject;
13 
17 {
18 public:
20  virtual ~DtCollisionShapeManager();
21 
23  virtual void addShapeFromObject(btCollisionObject* objectPtr);
25  virtual void removeObject(const btCollisionObject* objectPtr);
26 
29  virtual DtCollisionShapeId idForShape(const btCollisionShape* shapePtr);
32  virtual DtBvhTriangleMeshShape::Ptr shapeForId(DtCollisionShapeId id);
33 
34 protected:
35  void pruneDeletedShapes();
36 
37 protected:
38  DtCollisionShapeId myNextId = 1;
39 
40  using DtShapeWeakPtr = std::weak_ptr<DtBvhTriangleMeshShape>;
41  std::unordered_map<DtCollisionShapeId, DtShapeWeakPtr> myTrackedShapes;
42 };
This class tracks collision shapes, assigns them IDs and keeps weak pointers to the shapes so they ca...
Definition: collisionShapeManager.h:16
std::unordered_map< DtCollisionShapeId, DtShapeWeakPtr > myTrackedShapes
Definition: collisionShapeManager.h:41
std::weak_ptr< DtBvhTriangleMeshShape > DtShapeWeakPtr
Definition: collisionShapeManager.h:40
DtTerrainGeometryId DtCollisionShapeId
Definition: bvhTriangleMeshShape.h:25
#define DT_DLL_vantageTerrainImplementation
This file is used to determine how to build.
Definition: vantageTerrainImplementationDefines.h:28
std::shared_ptr< DtBvhTriangleMeshShape > Ptr
Definition: bvhTriangleMeshShape.h:83

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)