Changeset 2430 for code/branches/physics/src/bullet/BulletCollision/CollisionShapes/btConvexHullShape.h
- Timestamp:
- Dec 13, 2008, 11:45:51 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/bullet/BulletCollision/CollisionShapes/btConvexHullShape.h
r2192 r2430 25 25 ATTRIBUTE_ALIGNED16(class) btConvexHullShape : public btPolyhedralConvexShape 26 26 { 27 btAlignedObjectArray<bt Point3> m_points;27 btAlignedObjectArray<btVector3> m_unscaledPoints; 28 28 29 29 public: … … 34 34 ///It is easier to not pass any points in the constructor, and just add one point at a time, using addPoint. 35 35 ///btConvexHullShape make an internal copy of the points. 36 btConvexHullShape(const btScalar* points=0,int numPoints=0, int stride=sizeof(bt Point3));36 btConvexHullShape(const btScalar* points=0,int numPoints=0, int stride=sizeof(btVector3)); 37 37 38 void addPoint(const bt Point3& point);38 void addPoint(const btVector3& point); 39 39 40 btPoint3* getPoints() 40 41 btVector3* getUnscaledPoints() 41 42 { 42 return &m_ points[0];43 return &m_unscaledPoints[0]; 43 44 } 44 45 45 const bt Point3* getPoints() const46 const btVector3* getUnscaledPoints() const 46 47 { 47 return &m_ points[0];48 return &m_unscaledPoints[0]; 48 49 } 49 50 50 int getNumPoints() const 51 ///getPoints is obsolete, please use getUnscaledPoints 52 const btVector3* getPoints() const 51 53 { 52 return m_points.size(); 54 return getUnscaledPoints(); 55 } 56 57 58 59 60 SIMD_FORCE_INLINE btVector3 getScaledPoint(int i) const 61 { 62 return m_unscaledPoints[i] * m_localScaling; 63 } 64 65 SIMD_FORCE_INLINE int getNumPoints() const 66 { 67 return m_unscaledPoints.size(); 53 68 } 54 69 … … 65 80 virtual int getNumVertices() const; 66 81 virtual int getNumEdges() const; 67 virtual void getEdge(int i,bt Point3& pa,btPoint3& pb) const;68 virtual void getVertex(int i,bt Point3& vtx) const;82 virtual void getEdge(int i,btVector3& pa,btVector3& pb) const; 83 virtual void getVertex(int i,btVector3& vtx) const; 69 84 virtual int getNumPlanes() const; 70 virtual void getPlane(btVector3& planeNormal,bt Point3& planeSupport,int i ) const;71 virtual bool isInside(const bt Point3& pt,btScalar tolerance) const;85 virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const; 86 virtual bool isInside(const btVector3& pt,btScalar tolerance) const; 72 87 73 88 ///in case we receive negative scaling
Note: See TracChangeset
for help on using the changeset viewer.