43 virtual void Create()
override;
44 virtual void Destroy()
override;
52 void SetMaterial(
class Material* newMaterial);
54 uint32_t GetNumIndices()
const;
55 uint32_t GetNumFaces()
const;
56 uint32_t GetNumVertices()
const;
57 bool HasVertexColor()
const;
66 btBvhTriangleMeshShape* GetTriangleCollisionShape();
67 btCollisionShape* GetCollisionShape();
68 void SetCollisionShape(btCollisionShape* shape);
69 void SetCollisionShapes(uint32_t numCollisionShapes, btCollisionShape** collisionShapes, btTransform* transforms,
bool compound);
71 void SetGenerateTriangleCollisionMesh(
bool generate);
72 bool IsTriangleCollisionMeshEnabled()
const;
73 uint32_t GetVertexSize()
const;
75 static bool HandlePropChange(
Datum* datum, uint32_t index,
const void* newValue);
79 bool ShouldGenerateTriangleCollision()
const;
81 void CreateTriangleCollisionShape();
82 void DestroyTriangleCollisionShape();
88 void PrepareForRebuild();
90 void ResizeVertexArray(uint32_t newSize);
91 void ResizeIndexArray(uint32_t newSize);
96 uint32_t mNumVertices;
111 btCollisionShape* mCollisionShape;
112 btBvhTriangleMeshShape* mTriangleCollisionShape;
113 btTriangleIndexVertexArray* mTriangleIndexVertexArray;
114 btTriangleInfoMap* mTriangleInfoMap;
115 bool mGenerateTriangleCollisionMesh;
116 bool mHasVertexColor;
124 const aiScene* scene,
125 const aiMesh& meshData,
126 uint32_t numCollisionMeshes,
127 const aiMesh** collisionMeshes);
129 const aiScene* scene,
130 const std::vector<const aiMesh*>& renderMeshes,
131 uint32_t numCollisionMeshes,
132 const aiMesh** collisionMeshes);
134 std::vector<uint32_t> mPureVertexColors;
137#if CREATE_CONVEX_COLLISION_MESH
139 void CreateCollisionMesh(btCollisionShape* collisionShape);
140 std::vector<StaticMesh*> mCollisionMeshes;