Changeset 2430 for code/branches/physics/src/bullet/BulletCollision/CollisionShapes/btConvexPointCloudShape.h
- Timestamp:
- Dec 13, 2008, 11:45:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/bullet/BulletCollision/CollisionShapes/btConvexPointCloudShape.h
r2192 r2430 24 24 ATTRIBUTE_ALIGNED16(class) btConvexPointCloudShape : public btPolyhedralConvexShape 25 25 { 26 btVector3* m_ points;26 btVector3* m_unscaledPoints; 27 27 int m_numPoints; 28 28 29 public: 29 30 BT_DECLARE_ALIGNED_ALLOCATOR(); 30 31 31 btConvexPointCloudShape(btVector3* points,int numPoints); 32 btConvexPointCloudShape(btVector3* points,int numPoints, const btVector3& localScaling,bool computeAabb = true) 33 { 34 m_localScaling = localScaling; 35 m_shapeType = CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE; 36 m_unscaledPoints = points; 37 m_numPoints = numPoints; 32 38 33 void setPoints (btVector3* points, int numPoints); 34 35 btPoint3* getPoints() 36 { 37 return m_points; 39 if (computeAabb) 40 recalcLocalAabb(); 38 41 } 39 42 40 const btPoint3* getPoints() const43 void setPoints (btVector3* points, int numPoints, bool computeAabb = true) 41 44 { 42 return m_points; 45 m_unscaledPoints = points; 46 m_numPoints = numPoints; 47 48 if (computeAabb) 49 recalcLocalAabb(); 43 50 } 44 51 45 int getNumPoints() const 52 SIMD_FORCE_INLINE btVector3* getUnscaledPoints() 53 { 54 return m_unscaledPoints; 55 } 56 57 SIMD_FORCE_INLINE const btVector3* getUnscaledPoints() const 58 { 59 return m_unscaledPoints; 60 } 61 62 SIMD_FORCE_INLINE int getNumPoints() const 46 63 { 47 64 return m_numPoints; 48 65 } 49 66 67 SIMD_FORCE_INLINE btVector3 getScaledPoint( int index) const 68 { 69 return m_unscaledPoints[index] * m_localScaling; 70 } 71 72 #ifndef __SPU__ 50 73 virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; 51 74 virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; 52 75 virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; 76 #endif 53 77 54 78 … … 58 82 virtual int getNumVertices() const; 59 83 virtual int getNumEdges() const; 60 virtual void getEdge(int i,bt Point3& pa,btPoint3& pb) const;61 virtual void getVertex(int i,bt Point3& vtx) const;84 virtual void getEdge(int i,btVector3& pa,btVector3& pb) const; 85 virtual void getVertex(int i,btVector3& vtx) const; 62 86 virtual int getNumPlanes() const; 63 virtual void getPlane(btVector3& planeNormal,bt Point3& planeSupport,int i ) const;64 virtual bool isInside(const bt Point3& pt,btScalar tolerance) const;87 virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const; 88 virtual bool isInside(const btVector3& pt,btScalar tolerance) const; 65 89 66 90 ///in case we receive negative scaling
Note: See TracChangeset
for help on using the changeset viewer.