Rename all member variables to follow the style guidelines (prefixed with the 'm') - class TSShape

This commit is contained in:
bank 2014-05-13 14:08:42 +04:00
parent 2112c81446
commit 69dbaf5b85
35 changed files with 1377 additions and 1377 deletions

View file

@ -52,10 +52,10 @@ bool TSShapeInstance::buildPolyList(AbstractPolyList * polyList, S32 dl)
if (dl==-1)
return false;
AssertFatal(dl>=0 && dl<mShape->details.size(),"TSShapeInstance::buildPolyList");
AssertFatal(dl>=0 && dl<mShape->mDetails.size(),"TSShapeInstance::buildPolyList");
// get subshape and object detail
const TSDetail * detail = &mShape->details[dl];
const TSDetail * detail = &mShape->mDetails[dl];
S32 ss = detail->subShapeNum;
S32 od = detail->objectDetailNum;
@ -67,8 +67,8 @@ bool TSShapeInstance::buildPolyList(AbstractPolyList * polyList, S32 dl)
bool emitted = false;
U32 surfaceKey = 0;
S32 start = mShape->subShapeFirstObject[ss];
S32 end = mShape->subShapeNumObjects[ss] + start;
S32 start = mShape->mSubShapeFirstObject[ss];
S32 end = mShape->mSubShapeNumObjects[ss] + start;
if (start<end)
{
MatrixF initialMat;
@ -124,10 +124,10 @@ bool TSShapeInstance::getFeatures(const MatrixF& mat, const Point3F& n, ConvexFe
if (dl==-1)
return false;
AssertFatal(dl>=0 && dl<mShape->details.size(),"TSShapeInstance::buildPolyList");
AssertFatal(dl>=0 && dl<mShape->mDetails.size(),"TSShapeInstance::buildPolyList");
// get subshape and object detail
const TSDetail * detail = &mShape->details[dl];
const TSDetail * detail = &mShape->mDetails[dl];
S32 ss = detail->subShapeNum;
S32 od = detail->objectDetailNum;
@ -135,8 +135,8 @@ bool TSShapeInstance::getFeatures(const MatrixF& mat, const Point3F& n, ConvexFe
bool emitted = false;
U32 surfaceKey = 0;
S32 start = mShape->subShapeFirstObject[ss];
S32 end = mShape->subShapeNumObjects[ss] + start;
S32 start = mShape->mSubShapeFirstObject[ss];
S32 end = mShape->mSubShapeNumObjects[ss] + start;
if (start<end)
{
MatrixF final;
@ -168,10 +168,10 @@ bool TSShapeInstance::castRay(const Point3F & a, const Point3F & b, RayInfo * ra
if (dl==-1)
return false;
AssertFatal(dl>=0 && dl<mShape->details.size(),"TSShapeInstance::castRay");
AssertFatal(dl>=0 && dl<mShape->mDetails.size(),"TSShapeInstance::castRay");
// get subshape and object detail
const TSDetail * detail = &mShape->details[dl];
const TSDetail * detail = &mShape->mDetails[dl];
S32 ss = detail->subShapeNum;
S32 od = detail->objectDetailNum;
@ -179,8 +179,8 @@ bool TSShapeInstance::castRay(const Point3F & a, const Point3F & b, RayInfo * ra
if ( ss < 0 )
return false;
S32 start = mShape->subShapeFirstObject[ss];
S32 end = mShape->subShapeNumObjects[ss] + start;
S32 start = mShape->mSubShapeFirstObject[ss];
S32 end = mShape->mSubShapeNumObjects[ss] + start;
RayInfo saveRay;
saveRay.t = 1.0f;
const MatrixF * saveMat = NULL;
@ -255,18 +255,18 @@ bool TSShapeInstance::castRayRendered(const Point3F & a, const Point3F & b, RayI
if (dl==-1)
return false;
AssertFatal(dl>=0 && dl<mShape->details.size(),"TSShapeInstance::castRayRendered");
AssertFatal(dl>=0 && dl<mShape->mDetails.size(),"TSShapeInstance::castRayRendered");
// get subshape and object detail
const TSDetail * detail = &mShape->details[dl];
const TSDetail * detail = &mShape->mDetails[dl];
S32 ss = detail->subShapeNum;
S32 od = detail->objectDetailNum;
if ( ss == -1 )
return false;
S32 start = mShape->subShapeFirstObject[ss];
S32 end = mShape->subShapeNumObjects[ss] + start;
S32 start = mShape->mSubShapeFirstObject[ss];
S32 end = mShape->mSubShapeNumObjects[ss] + start;
RayInfo saveRay;
saveRay.t = 1.0f;
const MatrixF * saveMat = NULL;
@ -339,15 +339,15 @@ Point3F TSShapeInstance::support(const Point3F & v, S32 dl)
{
// if dl==-1, nothing to do
AssertFatal(dl != -1, "Error, should never try to collide with a non-existant detail level!");
AssertFatal(dl>=0 && dl<mShape->details.size(),"TSShapeInstance::support");
AssertFatal(dl>=0 && dl<mShape->mDetails.size(),"TSShapeInstance::support");
// get subshape and object detail
const TSDetail * detail = &mShape->details[dl];
const TSDetail * detail = &mShape->mDetails[dl];
S32 ss = detail->subShapeNum;
S32 od = detail->objectDetailNum;
S32 start = mShape->subShapeFirstObject[ss];
S32 end = mShape->subShapeNumObjects[ss] + start;
S32 start = mShape->mSubShapeFirstObject[ss];
S32 end = mShape->mSubShapeNumObjects[ss] + start;
F32 currMaxDP = -1e9f;
Point3F currSupport = Point3F(0, 0, 0);
@ -404,22 +404,22 @@ void TSShapeInstance::computeBounds(S32 dl, Box3F & bounds)
if (dl==-1)
return;
AssertFatal(dl>=0 && dl<mShape->details.size(),"TSShapeInstance::computeBounds");
AssertFatal(dl>=0 && dl<mShape->mDetails.size(),"TSShapeInstance::computeBounds");
// get subshape and object detail
const TSDetail * detail = &mShape->details[dl];
const TSDetail * detail = &mShape->mDetails[dl];
S32 ss = detail->subShapeNum;
S32 od = detail->objectDetailNum;
// use shape bounds for imposter details
if (ss < 0)
{
bounds = mShape->bounds;
bounds = mShape->mBounds;
return;
}
S32 start = mShape->subShapeFirstObject[ss];
S32 end = mShape->subShapeNumObjects[ss] + start;
S32 start = mShape->mSubShapeFirstObject[ss];
S32 end = mShape->mSubShapeNumObjects[ss] + start;
// run through objects and updating bounds as we go
bounds.minExtents.set( 10E30f, 10E30f, 10E30f);
@ -587,10 +587,10 @@ bool TSShapeInstance::buildPolyListOpcode( S32 dl, AbstractPolyList *polyList, c
if (dl==-1)
return false;
AssertFatal(dl>=0 && dl<mShape->details.size(),"TSShapeInstance::buildPolyListOpcode");
AssertFatal(dl>=0 && dl<mShape->mDetails.size(),"TSShapeInstance::buildPolyListOpcode");
// get subshape and object detail
const TSDetail * detail = &mShape->details[dl];
const TSDetail * detail = &mShape->mDetails[dl];
S32 ss = detail->subShapeNum;
if ( ss < 0 )
return false;
@ -600,8 +600,8 @@ bool TSShapeInstance::buildPolyListOpcode( S32 dl, AbstractPolyList *polyList, c
// nothing emitted yet...
bool emitted = false;
S32 start = mShape->subShapeFirstObject[ss];
S32 end = mShape->subShapeNumObjects[ss] + start;
S32 start = mShape->mSubShapeFirstObject[ss];
S32 end = mShape->mSubShapeNumObjects[ss] + start;
if (start<end)
{
MatrixF initialMat;
@ -670,12 +670,12 @@ bool TSShapeInstance::castRayOpcode( S32 dl, const Point3F & startPos, const Poi
if (dl==-1)
return false;
AssertFatal(dl>=0 && dl<mShape->details.size(),"TSShapeInstance::castRayOpcode");
AssertFatal(dl>=0 && dl<mShape->mDetails.size(),"TSShapeInstance::castRayOpcode");
info->t = 100.f;
// get subshape and object detail
const TSDetail * detail = &mShape->details[dl];
const TSDetail * detail = &mShape->mDetails[dl];
S32 ss = detail->subShapeNum;
if ( ss < 0 )
return false;
@ -686,8 +686,8 @@ bool TSShapeInstance::castRayOpcode( S32 dl, const Point3F & startPos, const Poi
bool emitted = false;
const MatrixF* saveMat = NULL;
S32 start = mShape->subShapeFirstObject[ss];
S32 end = mShape->subShapeNumObjects[ss] + start;
S32 start = mShape->mSubShapeFirstObject[ss];
S32 end = mShape->mSubShapeNumObjects[ss] + start;
if (start<end)
{
MatrixF mat;
@ -742,18 +742,18 @@ bool TSShapeInstance::castRayOpcode( S32 dl, const Point3F & startPos, const Poi
bool TSShapeInstance::buildConvexOpcode( const MatrixF &objMat, const Point3F &objScale, S32 dl, const Box3F &bounds, Convex *c, Convex *list )
{
AssertFatal(dl>=0 && dl<mShape->details.size(),"TSShapeInstance::buildConvexOpcode");
AssertFatal(dl>=0 && dl<mShape->mDetails.size(),"TSShapeInstance::buildConvexOpcode");
// get subshape and object detail
const TSDetail * detail = &mShape->details[dl];
const TSDetail * detail = &mShape->mDetails[dl];
S32 ss = detail->subShapeNum;
S32 od = detail->objectDetailNum;
// nothing emitted yet...
bool emitted = false;
S32 start = mShape->subShapeFirstObject[ss];
S32 end = mShape->subShapeNumObjects[ss] + start;
S32 start = mShape->mSubShapeFirstObject[ss];
S32 end = mShape->mSubShapeNumObjects[ss] + start;
if (start<end)
{
MatrixF initialMat = objMat;
@ -823,10 +823,10 @@ void TSShape::findColDetails( bool useVisibleMesh, Vector<S32> *outDetails, Vect
U32 highestDetail = -1;
F32 highestSize = -F32_MAX;
for ( U32 i = 0; i < details.size(); i++ )
for ( U32 i = 0; i < mDetails.size(); i++ )
{
// Make sure we skip any details that shouldn't be rendered
if ( details[i].size < 0 )
if ( mDetails[i].size < 0 )
continue;
/*
@ -838,10 +838,10 @@ void TSShape::findColDetails( bool useVisibleMesh, Vector<S32> *outDetails, Vect
*/
// Otherwise test against the current highest size
if ( details[i].size > highestSize )
if ( mDetails[i].size > highestSize )
{
highestDetail = i;
highestSize = details[i].size;
highestSize = mDetails[i].size;
}
}
@ -861,9 +861,9 @@ void TSShape::findColDetails( bool useVisibleMesh, Vector<S32> *outDetails, Vect
//
// The LOS (light of sight) details are used for raycasts.
for ( U32 i = 0; i < details.size(); i++ )
for ( U32 i = 0; i < mDetails.size(); i++ )
{
const String &name = names[ details[i].nameIndex ];
const String &name = mNames[ mDetails[i].nameIndex ];
if ( !dStrStartsWith( name, "Collision" ) )
continue;
@ -906,9 +906,9 @@ void TSShape::findColDetails( bool useVisibleMesh, Vector<S32> *outDetails, Vect
// Snag any "unmatched" LOS details and put
// them at the end of the list.
for ( U32 i = 0; i < details.size(); i++ )
for ( U32 i = 0; i < mDetails.size(); i++ )
{
const String &name = names[ details[i].nameIndex ];
const String &name = mNames[ mDetails[i].nameIndex ];
if ( !dStrStartsWith( name, "LOS" ) )
continue;
@ -954,7 +954,7 @@ PhysicsCollision* TSShape::_buildColShapes( bool useVisibleMesh, const Point3F &
// visible detail levels.
// A negative subshape on the detail means we don't have geometry.
const TSShape::Detail &detail = details[0];
const TSShape::Detail &detail = mDetails[0];
if ( detail.subShapeNum < 0 )
return NULL;
@ -964,16 +964,16 @@ PhysicsCollision* TSShape::_buildColShapes( bool useVisibleMesh, const Point3F &
polyList.setTransform( &MatrixF::Identity, scale );
// Create the collision meshes.
S32 start = subShapeFirstObject[ detail.subShapeNum ];
S32 end = start + subShapeNumObjects[ detail.subShapeNum ];
S32 start = mSubShapeFirstObject[ detail.subShapeNum ];
S32 end = start + mSubShapeNumObjects[ detail.subShapeNum ];
for ( S32 o=start; o < end; o++ )
{
const TSShape::Object &object = objects[o];
const TSShape::Object &object = mObjects[o];
if ( detail.objectDetailNum >= object.numMeshes )
continue;
// No mesh or no verts.... nothing to do.
TSMesh *mesh = meshes[ object.startMeshIndex + detail.objectDetailNum ];
TSMesh *mesh = mMeshes[ object.startMeshIndex + detail.objectDetailNum ];
if ( !mesh || mesh->mNumVerts == 0 )
continue;
@ -1013,31 +1013,31 @@ PhysicsCollision* TSShape::_buildColShapes( bool useVisibleMesh, const Point3F &
//
// TODO: We need to support LOS collision for physics.
//
for ( U32 i = 0; i < details.size(); i++ )
for ( U32 i = 0; i < mDetails.size(); i++ )
{
const TSShape::Detail &detail = details[i];
const String &name = names[detail.nameIndex];
const TSShape::Detail &detail = mDetails[i];
const String &name = mNames[detail.nameIndex];
// Is this a valid collision detail.
if ( !dStrStartsWith( name, "Collision" ) || detail.subShapeNum < 0 )
continue;
// Now go thru the meshes for this detail.
S32 start = subShapeFirstObject[ detail.subShapeNum ];
S32 end = start + subShapeNumObjects[ detail.subShapeNum ];
S32 start = mSubShapeFirstObject[ detail.subShapeNum ];
S32 end = start + mSubShapeNumObjects[ detail.subShapeNum ];
if ( start >= end )
continue;
for ( S32 o=start; o < end; o++ )
{
const TSShape::Object &object = objects[o];
const String &meshName = names[ object.nameIndex ];
const TSShape::Object &object = mObjects[o];
const String &meshName = mNames[ object.nameIndex ];
if ( object.numMeshes <= detail.objectDetailNum )
continue;
// No mesh, a flat bounds, or no verts.... nothing to do.
TSMesh *mesh = meshes[ object.startMeshIndex + detail.objectDetailNum ];
TSMesh *mesh = mMeshes[ object.startMeshIndex + detail.objectDetailNum ];
if ( !mesh || mesh->getBounds().isEmpty() || mesh->mNumVerts == 0 )
continue;