Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h')
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h65
1 files changed, 31 insertions, 34 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h
index ac4afa7f6b2..a8a362355cc 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h
@@ -26,47 +26,44 @@ subject to the following restrictions:
///Performance of btTriangleMesh and btTriangleIndexVertexArray used in a btBvhTriangleMeshShape is the same.
class btTriangleMesh : public btTriangleIndexVertexArray
{
- btAlignedObjectArray<btVector3> m_4componentVertices;
- btAlignedObjectArray<btScalar> m_3componentVertices;
+ btAlignedObjectArray<btVector3> m_4componentVertices;
+ btAlignedObjectArray<btScalar> m_3componentVertices;
- btAlignedObjectArray<unsigned int> m_32bitIndices;
- btAlignedObjectArray<unsigned short int> m_16bitIndices;
- bool m_use32bitIndices;
- bool m_use4componentVertices;
-
+ btAlignedObjectArray<unsigned int> m_32bitIndices;
+ btAlignedObjectArray<unsigned short int> m_16bitIndices;
+ bool m_use32bitIndices;
+ bool m_use4componentVertices;
- public:
- btScalar m_weldingThreshold;
+public:
+ btScalar m_weldingThreshold;
- btTriangleMesh (bool use32bitIndices=true,bool use4componentVertices=true);
+ btTriangleMesh(bool use32bitIndices = true, bool use4componentVertices = true);
- bool getUse32bitIndices() const
- {
- return m_use32bitIndices;
- }
+ bool getUse32bitIndices() const
+ {
+ return m_use32bitIndices;
+ }
- bool getUse4componentVertices() const
- {
- return m_use4componentVertices;
- }
- ///By default addTriangle won't search for duplicate vertices, because the search is very slow for large triangle meshes.
- ///In general it is better to directly use btTriangleIndexVertexArray instead.
- void addTriangle(const btVector3& vertex0,const btVector3& vertex1,const btVector3& vertex2, bool removeDuplicateVertices=false);
+ bool getUse4componentVertices() const
+ {
+ return m_use4componentVertices;
+ }
+ ///By default addTriangle won't search for duplicate vertices, because the search is very slow for large triangle meshes.
+ ///In general it is better to directly use btTriangleIndexVertexArray instead.
+ void addTriangle(const btVector3& vertex0, const btVector3& vertex1, const btVector3& vertex2, bool removeDuplicateVertices = false);
- ///Add a triangle using its indices. Make sure the indices are pointing within the vertices array, so add the vertices first (and to be sure, avoid removal of duplicate vertices)
- void addTriangleIndices(int index1, int index2, int index3 );
-
- int getNumTriangles() const;
+ ///Add a triangle using its indices. Make sure the indices are pointing within the vertices array, so add the vertices first (and to be sure, avoid removal of duplicate vertices)
+ void addTriangleIndices(int index1, int index2, int index3);
- virtual void preallocateVertices(int numverts);
- virtual void preallocateIndices(int numindices);
+ int getNumTriangles() const;
- ///findOrAddVertex is an internal method, use addTriangle instead
- int findOrAddVertex(const btVector3& vertex, bool removeDuplicateVertices);
- ///addIndex is an internal method, use addTriangle instead
- void addIndex(int index);
-
-};
+ virtual void preallocateVertices(int numverts);
+ virtual void preallocateIndices(int numindices);
-#endif //BT_TRIANGLE_MESH_H
+ ///findOrAddVertex is an internal method, use addTriangle instead
+ int findOrAddVertex(const btVector3& vertex, bool removeDuplicateVertices);
+ ///addIndex is an internal method, use addTriangle instead
+ void addIndex(int index);
+};
+#endif //BT_TRIANGLE_MESH_H