cleaned up member::radius

This commit is contained in:
Azaezel 2018-03-13 15:31:00 -05:00
parent 4615bd6db8
commit 3ceaa0ed50
12 changed files with 18 additions and 18 deletions

View file

@ -269,7 +269,7 @@ void GuiMaterialPreview::setObjectModel(const char* modelName)
// Initialize camera values: // Initialize camera values:
mOrbitPos = mModel->getShape()->center; mOrbitPos = mModel->getShape()->center;
mMinOrbitDist = mModel->getShape()->radius; mMinOrbitDist = mModel->getShape()->mRadius;
lastRenderTime = Platform::getVirtualMilliseconds(); lastRenderTime = Platform::getVirtualMilliseconds();
} }

View file

@ -367,7 +367,7 @@ void GuiObjectView::setObjectModel( const String& modelName )
// Initialize camera values. // Initialize camera values.
mOrbitPos = mModel->getShape()->center; mOrbitPos = mModel->getShape()->center;
mMinOrbitDist = mModel->getShape()->radius; mMinOrbitDist = mModel->getShape()->mRadius;
// Initialize animation. // Initialize animation.

View file

@ -400,7 +400,7 @@ bool WheeledVehicleData::preload(bool server, String &errorStr)
MatrixF imat(1); MatrixF imat(1);
SphereF sphere; SphereF sphere;
sphere.center = mShape->center; sphere.center = mShape->center;
sphere.radius = mShape->radius; sphere.radius = mShape->mRadius;
PlaneExtractorPolyList polyList; PlaneExtractorPolyList polyList;
polyList.mPlaneList = &rigidBody.mPlaneList; polyList.mPlaneList = &rigidBody.mPlaneList;
polyList.setTransform(&imat, Point3F(1,1,1)); polyList.setTransform(&imat, Point3F(1,1,1));

View file

@ -348,7 +348,7 @@ bool VolumetricFog::LoadShape()
} }
mObjBox = mShape->mBounds; mObjBox = mShape->mBounds;
mRadius = mShape->radius; mRadius = mShape->mRadius;
resetWorldBox(); resetWorldBox();
if (!isClientObject()) if (!isClientObject())
@ -561,7 +561,7 @@ U32 VolumetricFog::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
if (bool(mShape) == false) if (bool(mShape) == false)
return retMask; return retMask;
mObjBox = mShape->mBounds; mObjBox = mShape->mBounds;
mRadius = mShape->radius; mRadius = mShape->mRadius;
resetWorldBox(); resetWorldBox();
mObjSize = mWorldBox.getGreatestDiagonalLength(); mObjSize = mWorldBox.getGreatestDiagonalLength();
mObjScale = getScale(); mObjScale = getScale();

View file

@ -366,8 +366,8 @@ bool GuiShapeEdPreview::setObjectModel(const char* modelName)
mOrbitPos = shape->center; mOrbitPos = shape->center;
// Set camera move and zoom speed according to model size // Set camera move and zoom speed according to model size
mMoveSpeed = shape->radius / sMoveScaler; mMoveSpeed = shape->mRadius / sMoveScaler;
mZoomSpeed = shape->radius / sZoomScaler; mZoomSpeed = shape->mRadius / sZoomScaler;
// Reset node selection // Reset node selection
mHoverNode = -1; mHoverNode = -1;

View file

@ -95,7 +95,7 @@ bool BlobShadow::shouldRender(F32 camDist)
if (mShapeBase && mShapeBase->getFadeVal() < TSMesh::VISIBILITY_EPSILON) if (mShapeBase && mShapeBase->getFadeVal() < TSMesh::VISIBILITY_EPSILON)
return false; return false;
F32 shadowLen = 10.0f * mShapeInstance->getShape()->radius; F32 shadowLen = 10.0f * mShapeInstance->getShape()->mRadius;
Point3F pos = mShapeInstance->getShape()->center; Point3F pos = mShapeInstance->getShape()->center;
// this is a bit of a hack...move generic shadows towards feet/base of shape // this is a bit of a hack...move generic shadows towards feet/base of shape

View file

@ -1225,8 +1225,8 @@ void TSShapeLoader::install()
shape->mBounds = Box3F(1.0f); shape->mBounds = Box3F(1.0f);
shape->mBounds.getCenter(&shape->center); shape->mBounds.getCenter(&shape->center);
shape->radius = (shape->mBounds.maxExtents - shape->center).len(); shape->mRadius = (shape->mBounds.maxExtents - shape->center).len();
shape->tubeRadius = shape->radius; shape->tubeRadius = shape->mRadius;
shape->init(); shape->init();
shape->finalizeEditable(); shape->finalizeEditable();

View file

@ -82,7 +82,7 @@ TSLastDetail::TSLastDetail( TSShape *shape,
mDl = dl; mDl = dl;
mDim = getMax( dim, (S32)32 ); mDim = getMax( dim, (S32)32 );
mRadius = mShape->radius; mRadius = mShape->mRadius;
mCenter = mShape->center; mCenter = mShape->center;
mCachePath = cachePath; mCachePath = cachePath;

View file

@ -1195,7 +1195,7 @@ void TSShape::assembleShape()
tsalloc.checkGuard(); tsalloc.checkGuard();
// get bounds... // get bounds...
tsalloc.get32((S32*)&radius,1); tsalloc.get32((S32*)&mRadius,1);
tsalloc.get32((S32*)&tubeRadius,1); tsalloc.get32((S32*)&tubeRadius,1);
tsalloc.get32((S32*)&center,3); tsalloc.get32((S32*)&center,3);
tsalloc.get32((S32*)&mBounds,6); tsalloc.get32((S32*)&mBounds,6);
@ -1670,7 +1670,7 @@ void TSShape::disassembleShape()
tsalloc.setGuard(); tsalloc.setGuard();
// get bounds... // get bounds...
tsalloc.copyToBuffer32((S32*)&radius,1); tsalloc.copyToBuffer32((S32*)&mRadius,1);
tsalloc.copyToBuffer32((S32*)&tubeRadius,1); tsalloc.copyToBuffer32((S32*)&tubeRadius,1);
tsalloc.copyToBuffer32((S32*)&center,3); tsalloc.copyToBuffer32((S32*)&center,3);
tsalloc.copyToBuffer32((S32*)&mBounds,6); tsalloc.copyToBuffer32((S32*)&mBounds,6);
@ -2060,7 +2060,7 @@ void TSShape::createEmptyShape()
names[1] = StringTable->insert("Mesh2"); names[1] = StringTable->insert("Mesh2");
names[2] = StringTable->insert("Mesh"); names[2] = StringTable->insert("Mesh");
radius = 0.866025f; mRadius = 0.866025f;
tubeRadius = 0.707107f; tubeRadius = 0.707107f;
center.set(0.0f, 0.5f, 0.0f); center.set(0.0f, 0.5f, 0.0f);
mBounds.minExtents.set(-0.5f, 0.0f, -0.5f); mBounds.minExtents.set(-0.5f, 0.0f, -0.5f);

View file

@ -354,7 +354,7 @@ class TSShape
/// @name Bounding /// @name Bounding
/// @{ /// @{
F32 radius; F32 mRadius;
F32 tubeRadius; F32 tubeRadius;
Point3F center; Point3F center;
Box3F mBounds; Box3F mBounds;

View file

@ -1459,8 +1459,8 @@ DefineTSShapeConstructorMethod( setBounds, bool, ( Box3F bbox ),,
shape->mBounds = bbox; shape->mBounds = bbox;
shape->mBounds.getCenter( &shape->center ); shape->mBounds.getCenter( &shape->center );
shape->radius = ( shape->mBounds.maxExtents - shape->center ).len(); shape->mRadius = ( shape->mBounds.maxExtents - shape->center ).len();
shape->tubeRadius = shape->radius; shape->tubeRadius = shape->mRadius;
ADD_TO_CHANGE_SET(); ADD_TO_CHANGE_SET();
return true; return true;

View file

@ -662,7 +662,7 @@ S32 TSShapeInstance::setDetailFromDistance( const SceneRenderState *state, F32 s
// We're inlining SceneRenderState::projectRadius here to // We're inlining SceneRenderState::projectRadius here to
// skip the unnessasary divide by zero protection. // skip the unnessasary divide by zero protection.
F32 pixelRadius = ( mShape->radius / scaledDistance ) * state->getWorldToScreenScale().y * pixelScale; F32 pixelRadius = ( mShape->mRadius / scaledDistance ) * state->getWorldToScreenScale().y * pixelScale;
F32 pixelSize = pixelRadius * smDetailAdjust; F32 pixelSize = pixelRadius * smDetailAdjust;
if ( pixelSize < smSmallestVisiblePixelSize ) { if ( pixelSize < smSmallestVisiblePixelSize ) {