merged most of the changes from the branch into trunk, except for COLLADA, libxml and glut glitches.
Still need to verify to make sure no unwanted renaming is introduced.
This commit is contained in:
@@ -540,7 +540,7 @@ Hull* Hull::MakeHullFromTemp()
|
||||
|
||||
|
||||
|
||||
void Hull::ProcessHullHull(Separation& sep,const Hull& shapeA,const Hull& shapeB,const Transform& trA,const Transform& trB,HullContactCollector* collector)
|
||||
void Hull::ProcessHullHull(btSeparation& sep,const Hull& shapeA,const Hull& shapeB,const Transform& trA,const Transform& trB,HullContactCollector* collector)
|
||||
{
|
||||
Point3 vertsA[Hull::kMaxVerts];
|
||||
Point3 vertsB[Hull::kMaxVerts];
|
||||
@@ -563,7 +563,7 @@ void Hull::ProcessHullHull(Separation& sep,const Hull& shapeA,const Hull& shapeB
|
||||
|
||||
#ifdef SHAPE_COLLIDER_USE_CACHING
|
||||
// update cached pair
|
||||
if (sep.m_separator != Separation::kFeatureNone)
|
||||
if (sep.m_separator != btSeparation::kFeatureNone)
|
||||
{
|
||||
// re-use the separation
|
||||
if (UpdateSeparationHullHull(sep, pVertsA, pVertsB, trA, trB) == true)
|
||||
@@ -756,7 +756,7 @@ int Hull::ClipFace(int numVerts, Point3** ppVtxIn, Point3** ppVtxOut, const Plan
|
||||
|
||||
|
||||
|
||||
int Hull::AddContactsHullHull(Separation& sep, const Point3* pVertsA, const Point3* pVertsB,
|
||||
int Hull::AddContactsHullHull(btSeparation& sep, const Point3* pVertsA, const Point3* pVertsB,
|
||||
const Transform& trA, const Transform& trB,const Hull& hullA,const Hull& hullB,
|
||||
HullContactCollector* hullContactCollector)
|
||||
{
|
||||
@@ -765,7 +765,7 @@ int Hull::AddContactsHullHull(Separation& sep, const Point3* pVertsA, const Poin
|
||||
Vector3 normalWorld = sep.m_axis;
|
||||
|
||||
// edge->edge contact is always a single point
|
||||
if (sep.m_separator == Separation::kFeatureBoth)
|
||||
if (sep.m_separator == btSeparation::kFeatureBoth)
|
||||
{
|
||||
const Hull::Edge& edgeA = hullA.GetEdge(sep.m_featureA);
|
||||
const Hull::Edge& edgeB = hullB.GetEdge(sep.m_featureB);
|
||||
@@ -799,7 +799,7 @@ int Hull::AddContactsHullHull(Separation& sep, const Point3* pVertsA, const Poin
|
||||
|
||||
// find face of hull A that is most opposite contact axis
|
||||
// TODO: avoid having to transform planes here
|
||||
if (sep.m_separator == Separation::kFeatureB)
|
||||
if (sep.m_separator == btSeparation::kFeatureB)
|
||||
{
|
||||
const Hull::Edge& edgeB = hullB.GetEdge(hullB.GetFaceFirstEdge(faceB));
|
||||
tangent = Normalize(pVertsB[edgeB.m_verts[1]] - pVertsB[edgeB.m_verts[0]]);
|
||||
@@ -921,7 +921,7 @@ int Hull::AddContactsHullHull(Separation& sep, const Point3* pVertsA, const Poin
|
||||
// if no separating axis was found then details of least penetrating axis are returned
|
||||
// resulting axis always points away from hullB
|
||||
// either transform can be null in which case it is treated as identity (this avoids a bunch of work)
|
||||
bool Hull::GetSeparationHullHull(Separation& sep, const Point3* pVertsA, const Point3* pVertsB,
|
||||
bool Hull::GetSeparationHullHull(btSeparation& sep, const Point3* pVertsA, const Point3* pVertsB,
|
||||
const Transform& trA, const Transform& trB,
|
||||
const Hull& hullA,
|
||||
const Hull& hullB
|
||||
@@ -930,7 +930,7 @@ bool Hull::GetSeparationHullHull(Separation& sep, const Point3* pVertsA, const P
|
||||
//const Hull& hullA((const Hull&)*sep.m_pShapeA->GetShape());
|
||||
//const Hull& hullB((const Hull&)*sep.m_pShapeB->GetShape());
|
||||
|
||||
sep.m_separator = Separation::kFeatureNone;
|
||||
sep.m_separator = btSeparation::kFeatureNone;
|
||||
sep.m_dist = MinValueF;
|
||||
sep.m_featureA = sep.m_featureB = -1;
|
||||
sep.m_contact = -1;
|
||||
@@ -952,7 +952,7 @@ bool Hull::GetSeparationHullHull(Separation& sep, const Point3* pVertsA, const P
|
||||
sep.m_featureB = p;
|
||||
sep.m_dist = minDist;
|
||||
sep.m_axis = planeWorld.GetNormal();
|
||||
sep.m_separator = Separation::kFeatureB;
|
||||
sep.m_separator = btSeparation::kFeatureB;
|
||||
}
|
||||
|
||||
// got a separating plane?
|
||||
@@ -982,7 +982,7 @@ bool Hull::GetSeparationHullHull(Separation& sep, const Point3* pVertsA, const P
|
||||
{
|
||||
sep.m_dist = (float)minDist;
|
||||
sep.m_axis = -planeWorld.GetNormal();
|
||||
sep.m_separator = Separation::kFeatureA;
|
||||
sep.m_separator = btSeparation::kFeatureA;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1048,7 +1048,7 @@ bool Hull::GetSeparationHullHull(Separation& sep, const Point3* pVertsA, const P
|
||||
sep.m_featureB = eb;
|
||||
sep.m_dist = dminA;
|
||||
sep.m_axis = axis;
|
||||
sep.m_separator = Separation::kFeatureBoth;
|
||||
sep.m_separator = btSeparation::kFeatureBoth;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1065,7 +1065,7 @@ bool Hull::GetSeparationHullHull(Separation& sep, const Point3* pVertsA, const P
|
||||
// sep.m_featureB = eb;
|
||||
sep.m_dist = dminA;
|
||||
sep.m_axis = axis;
|
||||
// sep.m_separator = Separation::kFeatureBoth;
|
||||
// sep.m_separator = btSeparation::kFeatureBoth;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -138,8 +138,8 @@ public:
|
||||
|
||||
Point3 GetFaceCentroid(short face) const;
|
||||
|
||||
//static void ProcessHullHull(Separation& sep);
|
||||
static void ProcessHullHull(Separation& sep,const Hull& shapeA,const Hull& shapeB,const Transform& trA,const Transform& trB, HullContactCollector* collector);
|
||||
//static void ProcessHullHull(btSeparation& sep);
|
||||
static void ProcessHullHull(btSeparation& sep,const Hull& shapeA,const Hull& shapeB,const Transform& trA,const Transform& trB, HullContactCollector* collector);
|
||||
|
||||
virtual void ComputeInertia(const Transform& transform, Point3& centerOfMass, Matrix33& inertia, float totalMass) const;
|
||||
virtual Bounds3 ComputeBounds(const Transform& transform) const;
|
||||
@@ -153,13 +153,13 @@ public:
|
||||
/// Clips a face to the back of a plane
|
||||
static int ClipFace(int numVerts, Point3** ppVtxIn, Point3** ppVtxOut, const Plane& plane);
|
||||
|
||||
static bool GetSeparationHullHull(Separation& sep, const Point3* pVertsA, const Point3* pVertsB,
|
||||
static bool GetSeparationHullHull(btSeparation& sep, const Point3* pVertsA, const Point3* pVertsB,
|
||||
const Transform& trA, const Transform& trB,
|
||||
const Hull& hullA,
|
||||
const Hull& hullB
|
||||
);
|
||||
|
||||
static int AddContactsHullHull(Separation& sep, const Point3* pVertsA, const Point3* pVertsB,
|
||||
static int AddContactsHullHull(btSeparation& sep, const Point3* pVertsA, const Point3* pVertsB,
|
||||
const Transform& trA, const Transform& trB,const Hull& hullA,const Hull& hullB,
|
||||
HullContactCollector* hullContactCollector);
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ subject to the following restrictions:
|
||||
class Vector3;
|
||||
class Point3;
|
||||
class Scalar;
|
||||
struct Separation;
|
||||
struct btSeparation;
|
||||
|
||||
///HullContactCollector collects the Hull computation to the contact point results
|
||||
class HullContactCollector
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
|
||||
virtual ~HullContactCollector() {};
|
||||
|
||||
virtual int BatchAddContactGroup(const Separation& sep,int numContacts,const Vector3& normalWorld,const Vector3& tangent,const Point3* positionsWorld,const float* depths)=0;
|
||||
virtual int BatchAddContactGroup(const btSeparation& sep,int numContacts,const Vector3& normalWorld,const Vector3& tangent,const Point3* positionsWorld,const float* depths)=0;
|
||||
|
||||
virtual int GetMaxNumContacts() const = 0;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
|
||||
|
||||
struct Separation
|
||||
struct btSeparation
|
||||
{
|
||||
|
||||
short m_featureA;
|
||||
|
||||
Reference in New Issue
Block a user