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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user