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

@@ -17,30 +17,13 @@ subject to the following restrictions:
#include "LinearMath/btQuaternion.h"
btConvexPointCloudShape::btConvexPointCloudShape (btVector3* points,int numPoints) : btPolyhedralConvexShape ()
{
m_shapeType = CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE;
m_points = points;
m_numPoints = numPoints;
recalcLocalAabb();
}
void btConvexPointCloudShape::setPoints (btVector3* points, int numPoints)
{
m_points = points;
m_numPoints = numPoints;
recalcLocalAabb();
}
void btConvexPointCloudShape::setLocalScaling(const btVector3& scaling)
{
m_localScaling = scaling;
recalcLocalAabb();
}
#ifndef __SPU__
btVector3 btConvexPointCloudShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const
{
btVector3 supVec(btScalar(0.),btScalar(0.),btScalar(0.));
@@ -124,7 +107,7 @@ btVector3 btConvexPointCloudShape::localGetSupportingVertex(const btVector3& vec
}
#endif