diff options
Diffstat (limited to 'thirdparty/bullet/BulletCollision/CollisionShapes/btTriangleBuffer.h')
-rw-r--r-- | thirdparty/bullet/BulletCollision/CollisionShapes/btTriangleBuffer.h | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/thirdparty/bullet/BulletCollision/CollisionShapes/btTriangleBuffer.h b/thirdparty/bullet/BulletCollision/CollisionShapes/btTriangleBuffer.h index b71fc8b374..a89b9cd8a4 100644 --- a/thirdparty/bullet/BulletCollision/CollisionShapes/btTriangleBuffer.h +++ b/thirdparty/bullet/BulletCollision/CollisionShapes/btTriangleBuffer.h @@ -19,13 +19,13 @@ subject to the following restrictions: #include "btTriangleCallback.h" #include "LinearMath/btAlignedObjectArray.h" -struct btTriangle +struct btTriangle { - btVector3 m_vertex0; - btVector3 m_vertex1; - btVector3 m_vertex2; - int m_partId; - int m_triangleIndex; + btVector3 m_vertex0; + btVector3 m_vertex1; + btVector3 m_vertex2; + int m_partId; + int m_triangleIndex; }; ///The btTriangleBuffer callback can be useful to collect and store overlapping triangles between AABB and concave objects that support 'processAllTriangles' @@ -39,31 +39,25 @@ struct btTriangle /// } class btTriangleBuffer : public btTriangleCallback { + btAlignedObjectArray<btTriangle> m_triangleBuffer; - btAlignedObjectArray<btTriangle> m_triangleBuffer; - public: - - virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex); - - int getNumTriangles() const + + int getNumTriangles() const { return int(m_triangleBuffer.size()); } - - const btTriangle& getTriangle(int index) const + + const btTriangle& getTriangle(int index) const { return m_triangleBuffer[index]; } - void clearBuffer() + void clearBuffer() { m_triangleBuffer.clear(); } - }; - -#endif //BT_TRIANGLE_BUFFER_H - +#endif //BT_TRIANGLE_BUFFER_H |