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();
83 void ResizeVertexArray(uint32_t newSize);
84 void ResizeIndexArray(uint32_t newSize);
89 uint32_t mNumVertices;
98 btCollisionShape* mCollisionShape;
99 btBvhTriangleMeshShape* mTriangleCollisionShape;
100 btTriangleIndexVertexArray* mTriangleIndexVertexArray;
101 btTriangleInfoMap* mTriangleInfoMap;
102 bool mGenerateTriangleCollisionMesh;
103 bool mHasVertexColor;
111 const aiScene* scene,
112 const aiMesh& meshData,
113 uint32_t numCollisionMeshes,
114 const aiMesh** collisionMeshes);
116 std::vector<uint32_t> mPureVertexColors;
119#if CREATE_CONVEX_COLLISION_MESH
121 void CreateCollisionMesh(btCollisionShape* collisionShape);
122 std::vector<StaticMesh*> mCollisionMeshes;