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/btConvexHullShape.h')
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h
index 3fd5e382525..4773de2dc51 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h
@@ -17,18 +17,17 @@ subject to the following restrictions:
#define CONVEX_HULL_SHAPE_H
#include "btPolyhedralConvexShape.h"
-#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types
-#include "../../LinearMath/btAlignedObjectArray.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
+#include "LinearMath/btAlignedObjectArray.h"
-///ConvexHullShape implements an implicit (getSupportingVertex) Convex Hull of a Point Cloud (vertices)
-///No connectivity is needed. localGetSupportingVertex iterates linearly though all vertices.
-///on modern hardware, due to cache coherency this isn't that bad. Complex algorithms tend to trash the cash.
-///(memory is much slower then the cpu)
+///The btConvexHullShape implements an implicit convex hull of an array of vertices.
+///Bullet provides a general and fast collision detector for convex shapes based on GJK and EPA using localGetSupportingVertex.
ATTRIBUTE_ALIGNED16(class) btConvexHullShape : public btPolyhedralConvexShape
{
btAlignedObjectArray<btPoint3> m_points;
public:
+ BT_DECLARE_ALIGNED_ALLOCATOR();
///this constructor optionally takes in a pointer to points. Each point is assumed to be 3 consecutive btScalar (x,y,z), the striding defines the number of bytes between each point, in memory.
@@ -43,7 +42,12 @@ public:
return &m_points[0];
}
- int getNumPoints()
+ const btPoint3* getPoints() const
+ {
+ return &m_points[0];
+ }
+
+ int getNumPoints() const
{
return m_points.size();
}
@@ -56,7 +60,7 @@ public:
virtual int getShapeType()const { return CONVEX_HULL_SHAPE_PROXYTYPE; }
//debugging
- virtual char* getName()const {return "Convex";}
+ virtual const char* getName()const {return "Convex";}
virtual int getNumVertices() const;
@@ -67,7 +71,8 @@ public:
virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i ) const;
virtual bool isInside(const btPoint3& pt,btScalar tolerance) const;
-
+ ///in case we receive negative scaling
+ virtual void setLocalScaling(const btVector3& scaling);
};