Move some code (mainly constructors) into header files.

Add parameter to optionally compute local AABB for ConvexPointCloudShape
Add setter and getter for cached local AABB in PolyhedralConvexShape
This commit is contained in:
john.mccutchan
2008-10-08 16:56:08 +00:00
parent 7b1f30f1cf
commit 37f6b006af
6 changed files with 51 additions and 44 deletions

View File

@@ -28,9 +28,24 @@ ATTRIBUTE_ALIGNED16(class) btConvexPointCloudShape : public btPolyhedralConvexSh
public:
BT_DECLARE_ALIGNED_ALLOCATOR();
btConvexPointCloudShape(btVector3* points,int numPoints);
btConvexPointCloudShape(btVector3* points,int numPoints, bool computeAabb = true)
{
m_shapeType = CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE;
m_points = points;
m_numPoints = numPoints;
void setPoints (btVector3* points, int numPoints);
if (computeAabb)
recalcLocalAabb();
}
void setPoints (btVector3* points, int numPoints, bool computeAabb = true)
{
m_points = points;
m_numPoints = numPoints;
if (computeAabb)
recalcLocalAabb();
}
btPoint3* getPoints()
{
@@ -47,9 +62,11 @@ public:
return m_numPoints;
}
#ifndef __SPU__
virtual btVector3 localGetSupportingVertex(const btVector3& vec)const;
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
#endif
//debugging