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;
65 btBvhTriangleMeshShape* GetTriangleCollisionShape();
66 btCollisionShape* GetCollisionShape();
67 void SetCollisionShape(btCollisionShape* shape);
68 void SetCollisionShapes(uint32_t numCollisionShapes, btCollisionShape** collisionShapes, btTransform* transforms,
bool compound);
70 void SetGenerateTriangleCollisionMesh(
bool generate);
71 bool IsTriangleCollisionMeshEnabled()
const;
72 uint32_t GetVertexSize()
const;
74 static bool HandlePropChange(
Datum* datum, uint32_t index,
const void* newValue);
78 bool ShouldGenerateTriangleCollision()
const;
80 void CreateTriangleCollisionShape();
81 void DestroyTriangleCollisionShape();
87 void PrepareForRebuild();
89 void ResizeVertexArray(uint32_t newSize);
90 void ResizeIndexArray(uint32_t newSize);
95 uint32_t mNumVertices;
104 btCollisionShape* mCollisionShape;
105 btBvhTriangleMeshShape* mTriangleCollisionShape;
106 btTriangleIndexVertexArray* mTriangleIndexVertexArray;
107 btTriangleInfoMap* mTriangleInfoMap;
108 bool mGenerateTriangleCollisionMesh;
109 bool mHasVertexColor;
117 const aiScene* scene,
118 const aiMesh& meshData,
119 uint32_t numCollisionMeshes,
120 const aiMesh** collisionMeshes);
122 const aiScene* scene,
123 const std::vector<const aiMesh*>& renderMeshes,
124 uint32_t numCollisionMeshes,
125 const aiMesh** collisionMeshes);
127 std::vector<uint32_t> mPureVertexColors;
130#if CREATE_CONVEX_COLLISION_MESH
132 void CreateCollisionMesh(btCollisionShape* collisionShape);
133 std::vector<StaticMesh*> mCollisionMeshes;