mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-09 07:20:40 +00:00
Rename all member variables to follow the style guidelines (prefixed with the 'm') - class TSStaticPolysoupConvex
This commit is contained in:
parent
69dbaf5b85
commit
75755e42c0
3 changed files with 34 additions and 34 deletions
|
|
@ -897,31 +897,31 @@ void TSStatic::buildConvex(const Box3F& box, Convex* convex)
|
|||
SceneObject* TSStaticPolysoupConvex::smCurObject = NULL;
|
||||
|
||||
TSStaticPolysoupConvex::TSStaticPolysoupConvex()
|
||||
: box( 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f ),
|
||||
normal( 0.0f, 0.0f, 0.0f, 0.0f ),
|
||||
idx( 0 ),
|
||||
mesh( NULL )
|
||||
: mBox( 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f ),
|
||||
mNormal( 0.0f, 0.0f, 0.0f, 0.0f ),
|
||||
mIdx( 0 ),
|
||||
mMesh( NULL )
|
||||
{
|
||||
mType = TSPolysoupConvexType;
|
||||
|
||||
for ( U32 i = 0; i < 4; ++i )
|
||||
{
|
||||
verts[i].set( 0.0f, 0.0f, 0.0f );
|
||||
mVerts[i].set( 0.0f, 0.0f, 0.0f );
|
||||
}
|
||||
}
|
||||
|
||||
Point3F TSStaticPolysoupConvex::support(const VectorF& vec) const
|
||||
{
|
||||
F32 bestDot = mDot( verts[0], vec );
|
||||
F32 bestDot = mDot( mVerts[0], vec );
|
||||
|
||||
const Point3F *bestP = &verts[0];
|
||||
const Point3F *bestP = &mVerts[0];
|
||||
for(S32 i=1; i<4; i++)
|
||||
{
|
||||
F32 newD = mDot(verts[i], vec);
|
||||
F32 newD = mDot(mVerts[i], vec);
|
||||
if(newD > bestDot)
|
||||
{
|
||||
bestDot = newD;
|
||||
bestP = &verts[i];
|
||||
bestP = &mVerts[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -930,7 +930,7 @@ Point3F TSStaticPolysoupConvex::support(const VectorF& vec) const
|
|||
|
||||
Box3F TSStaticPolysoupConvex::getBoundingBox() const
|
||||
{
|
||||
Box3F wbox = box;
|
||||
Box3F wbox = mBox;
|
||||
wbox.minExtents.convolve( mObject->getScale() );
|
||||
wbox.maxExtents.convolve( mObject->getScale() );
|
||||
mObject->getTransform().mul(wbox);
|
||||
|
|
@ -940,7 +940,7 @@ Box3F TSStaticPolysoupConvex::getBoundingBox() const
|
|||
Box3F TSStaticPolysoupConvex::getBoundingBox(const MatrixF& mat, const Point3F& scale) const
|
||||
{
|
||||
AssertISV(false, "TSStaticPolysoupConvex::getBoundingBox(m,p) - Not implemented. -- XEA");
|
||||
return box;
|
||||
return mBox;
|
||||
}
|
||||
|
||||
void TSStaticPolysoupConvex::getPolyList(AbstractPolyList *list)
|
||||
|
|
@ -952,11 +952,11 @@ void TSStaticPolysoupConvex::getPolyList(AbstractPolyList *list)
|
|||
list->setObject(mObject);
|
||||
|
||||
// Add only the original collision triangle
|
||||
S32 base = list->addPoint(verts[0]);
|
||||
list->addPoint(verts[2]);
|
||||
list->addPoint(verts[1]);
|
||||
S32 base = list->addPoint(mVerts[0]);
|
||||
list->addPoint(mVerts[2]);
|
||||
list->addPoint(mVerts[1]);
|
||||
|
||||
list->begin(0, (U32)idx ^ (U32)mesh);
|
||||
list->begin(0, (U32)mIdx ^ (U32)mMesh);
|
||||
list->vertex(base + 2);
|
||||
list->vertex(base + 1);
|
||||
list->vertex(base + 0);
|
||||
|
|
@ -972,10 +972,10 @@ void TSStaticPolysoupConvex::getFeatures(const MatrixF& mat,const VectorF& n, Co
|
|||
// For a tetrahedron this is pretty easy... first
|
||||
// convert everything into world space.
|
||||
Point3F tverts[4];
|
||||
mat.mulP(verts[0], &tverts[0]);
|
||||
mat.mulP(verts[1], &tverts[1]);
|
||||
mat.mulP(verts[2], &tverts[2]);
|
||||
mat.mulP(verts[3], &tverts[3]);
|
||||
mat.mulP(mVerts[0], &tverts[0]);
|
||||
mat.mulP(mVerts[1], &tverts[1]);
|
||||
mat.mulP(mVerts[2], &tverts[2]);
|
||||
mat.mulP(mVerts[3], &tverts[3]);
|
||||
|
||||
// points...
|
||||
S32 firstVert = cf->mVertexList.size();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue