From 75755e42c074152742d90799d10c2c9bbcd756bb Mon Sep 17 00:00:00 2001 From: bank Date: Tue, 13 May 2014 16:15:36 +0400 Subject: [PATCH] Rename all member variables to follow the style guidelines (prefixed with the 'm') - class TSStaticPolysoupConvex --- Engine/source/T3D/tsStatic.cpp | 38 ++++++++++++++++---------------- Engine/source/T3D/tsStatic.h | 10 ++++----- Engine/source/ts/tsCollision.cpp | 20 ++++++++--------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Engine/source/T3D/tsStatic.cpp b/Engine/source/T3D/tsStatic.cpp index 74911db79..3fb399d65 100644 --- a/Engine/source/T3D/tsStatic.cpp +++ b/Engine/source/T3D/tsStatic.cpp @@ -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(); diff --git a/Engine/source/T3D/tsStatic.h b/Engine/source/T3D/tsStatic.h index fe7113294..bac444d12 100644 --- a/Engine/source/T3D/tsStatic.h +++ b/Engine/source/T3D/tsStatic.h @@ -56,11 +56,11 @@ public: ~TSStaticPolysoupConvex() {}; public: - Box3F box; - Point3F verts[4]; - PlaneF normal; - S32 idx; - TSMesh *mesh; + Box3F mBox; + Point3F mVerts[4]; + PlaneF mNormal; + S32 mIdx; + TSMesh *mMesh; static SceneObject* smCurObject; diff --git a/Engine/source/ts/tsCollision.cpp b/Engine/source/ts/tsCollision.cpp index fd3b17b06..01ceaad14 100644 --- a/Engine/source/ts/tsCollision.cpp +++ b/Engine/source/ts/tsCollision.cpp @@ -1280,10 +1280,10 @@ bool TSMesh::buildConvexOpcode( const MatrixF &meshToObjectMat, const Box3F &nod if( chunkc->getObject() != TSStaticPolysoupConvex::smCurObject ) continue; - if( chunkc->mesh != this ) + if( chunkc->mMesh != this ) continue; - if( chunkc->idx != curIdx ) + if( chunkc->mIdx != curIdx ) continue; // A match! Don't need to add it. @@ -1315,18 +1315,18 @@ bool TSMesh::buildConvexOpcode( const MatrixF &meshToObjectMat, const Box3F &nod list->registerObject( cp ); convex->addToWorkingList( cp ); - cp->mesh = this; - cp->idx = curIdx; + cp->mMesh = this; + cp->mIdx = curIdx; cp->mObject = TSStaticPolysoupConvex::smCurObject; - cp->normal = p; - cp->verts[0] = a; - cp->verts[1] = b; - cp->verts[2] = c; - cp->verts[3] = peak; + cp->mNormal = p; + cp->mVerts[0] = a; + cp->mVerts[1] = b; + cp->mVerts[2] = c; + cp->mVerts[3] = peak; // Update the bounding box. - Box3F &bounds = cp->box; + Box3F &bounds = cp->mBox; bounds.minExtents.set( F32_MAX, F32_MAX, F32_MAX ); bounds.maxExtents.set( -F32_MAX, -F32_MAX, -F32_MAX );