diff --git a/Engine/source/T3D/components/render/meshComponent.cpp b/Engine/source/T3D/components/render/meshComponent.cpp index c87733bf8..ad7ce0a5c 100644 --- a/Engine/source/T3D/components/render/meshComponent.cpp +++ b/Engine/source/T3D/components/render/meshComponent.cpp @@ -254,8 +254,8 @@ void MeshComponent::updateShape() mOwner->getWorldToObj().mulP(pos); - min = mMeshAsset->getShape()->bounds.minExtents; - max = mMeshAsset->getShape()->bounds.maxExtents; + min = mMeshAsset->getShape()->mBounds.minExtents; + max = mMeshAsset->getShape()->mBounds.maxExtents; if (mInterfaceData) { diff --git a/Engine/source/T3D/debris.cpp b/Engine/source/T3D/debris.cpp index 57d9a0577..23f18890b 100644 --- a/Engine/source/T3D/debris.cpp +++ b/Engine/source/T3D/debris.cpp @@ -669,7 +669,7 @@ bool Debris::onAdd() // Setup our bounding box if( mDataBlock->shape ) { - mObjBox = mDataBlock->shape->bounds; + mObjBox = mDataBlock->shape->mBounds; } else { diff --git a/Engine/source/T3D/examples/renderShapeExample.cpp b/Engine/source/T3D/examples/renderShapeExample.cpp index 0e60c3801..5f0847b90 100644 --- a/Engine/source/T3D/examples/renderShapeExample.cpp +++ b/Engine/source/T3D/examples/renderShapeExample.cpp @@ -213,7 +213,7 @@ void RenderShapeExample::createShape() } // Update the bounding box - mObjBox = mShape->bounds; + mObjBox = mShape->mBounds; resetWorldBox(); setRenderTransform(mObjToWorld); diff --git a/Engine/source/T3D/fx/explosion.cpp b/Engine/source/T3D/fx/explosion.cpp index 0236da6e9..4da7b2902 100644 --- a/Engine/source/T3D/fx/explosion.cpp +++ b/Engine/source/T3D/fx/explosion.cpp @@ -1384,7 +1384,7 @@ bool Explosion::explode() mEndingMS = U32(mExplosionInstance->getScaledDuration(mExplosionThread) * 1000.0f); mObjScale.convolve(mDataBlock->explosionScale); - mObjBox = mDataBlock->explosionShape->bounds; + mObjBox = mDataBlock->explosionShape->mBounds; resetWorldBox(); } diff --git a/Engine/source/T3D/fx/groundCover.cpp b/Engine/source/T3D/fx/groundCover.cpp index 63b5e3a2f..6e859e554 100644 --- a/Engine/source/T3D/fx/groundCover.cpp +++ b/Engine/source/T3D/fx/groundCover.cpp @@ -1142,7 +1142,7 @@ GroundCoverCell* GroundCover::_generateCell( const Point2I& index, const F32 typeMaxElevation = mMaxElevation[type]; const F32 typeMinElevation = mMinElevation[type]; const bool typeIsShape = mShapeInstances[ type ] != NULL; - const Box3F typeShapeBounds = typeIsShape ? mShapeInstances[ type ]->getShape()->bounds : Box3F(); + const Box3F typeShapeBounds = typeIsShape ? mShapeInstances[ type ]->getShape()->mBounds : Box3F(); const F32 typeWindScale = mWindScale[type]; StringTableEntry typeLayer = mLayer[type]; const bool typeInvertLayer = mInvertLayer[type]; diff --git a/Engine/source/T3D/physics/physicsDebris.cpp b/Engine/source/T3D/physics/physicsDebris.cpp index a2e2026b3..44d421c86 100644 --- a/Engine/source/T3D/physics/physicsDebris.cpp +++ b/Engine/source/T3D/physics/physicsDebris.cpp @@ -358,7 +358,7 @@ bool PhysicsDebris::onAdd() } // Setup our bounding box - mObjBox = mDataBlock->shape->bounds; + mObjBox = mDataBlock->shape->mBounds; resetWorldBox(); // Add it to the client scene. diff --git a/Engine/source/T3D/physics/physicsShape.cpp b/Engine/source/T3D/physics/physicsShape.cpp index 574707003..d4e0a3313 100644 --- a/Engine/source/T3D/physics/physicsShape.cpp +++ b/Engine/source/T3D/physics/physicsShape.cpp @@ -308,10 +308,10 @@ bool PhysicsShapeData::preload( bool server, String &errorBuffer ) { //no collision so we create a simple box collision shape from the shapes bounds and alert the user Con::warnf( "PhysicsShapeData::preload - No collision found for shape '%s', auto-creating one", shapeName ); - Point3F halfWidth = shape->bounds.getExtents() * 0.5f; + Point3F halfWidth = shape->mBounds.getExtents() * 0.5f; colShape = PHYSICSMGR->createCollision(); MatrixF centerXfm(true); - centerXfm.setPosition(shape->bounds.getCenter()); + centerXfm.setPosition(shape->mBounds.getCenter()); colShape->addBox(halfWidth, centerXfm); return true; } @@ -707,7 +707,7 @@ bool PhysicsShape::_createShape() return false; // Set the world box. - mObjBox = db->shape->bounds; + mObjBox = db->shape->mBounds; resetWorldBox(); // If this is the server and its a client only simulation diff --git a/Engine/source/T3D/projectile.cpp b/Engine/source/T3D/projectile.cpp index 7e77385a2..e457f6b2d 100644 --- a/Engine/source/T3D/projectile.cpp +++ b/Engine/source/T3D/projectile.cpp @@ -828,7 +828,7 @@ bool Projectile::onAdd() // Setup our bounding box if (bool(mDataBlock->projectileShape) == true) - mObjBox = mDataBlock->projectileShape->bounds; + mObjBox = mDataBlock->projectileShape->mBounds; else mObjBox = Box3F(Point3F(0, 0, 0), Point3F(0, 0, 0)); diff --git a/Engine/source/T3D/shapeBase.cpp b/Engine/source/T3D/shapeBase.cpp index 643a5955d..923714a5d 100644 --- a/Engine/source/T3D/shapeBase.cpp +++ b/Engine/source/T3D/shapeBase.cpp @@ -405,17 +405,17 @@ bool ShapeBaseData::preload(bool server, String &errorStr) mShape->computeBounds(collisionDetails.last(), collisionBounds.last()); mShape->getAccelerator(collisionDetails.last()); - if (!mShape->bounds.isContained(collisionBounds.last())) + if (!mShape->mBounds.isContained(collisionBounds.last())) { if (!silent_bbox_check) Con::warnf("Warning: shape %s collision detail %d (Collision-%d) bounds exceed that of shape.", shapeName, collisionDetails.size() - 1, collisionDetails.last()); - collisionBounds.last() = mShape->bounds; + collisionBounds.last() = mShape->mBounds; } else if (collisionBounds.last().isValidBox() == false) { if (!silent_bbox_check) Con::errorf("Error: shape %s-collision detail %d (Collision-%d) bounds box invalid!", shapeName, collisionDetails.size() - 1, collisionDetails.last()); - collisionBounds.last() = mShape->bounds; + collisionBounds.last() = mShape->mBounds; } // The way LOS works is that it will check to see if there is a LOS detail that matches @@ -482,7 +482,7 @@ bool ShapeBaseData::preload(bool server, String &errorStr) damageSequence = mShape->findSequence("Damage"); // - F32 w = mShape->bounds.len_y() / 2; + F32 w = mShape->mBounds.len_y() / 2; if (cameraMaxDist < w) cameraMaxDist = w; // just parse up the string and collect the remappings in txr_tag_remappings. @@ -707,7 +707,7 @@ DefineEngineMethod( ShapeBaseData, checkDeployPos, bool, ( TransformF txfm ),, MatrixF mat = txfm.getMatrix(); - Box3F objBox = object->mShape->bounds; + Box3F objBox = object->mShape->mBounds; Point3F boxCenter = (objBox.minExtents + objBox.maxExtents) * 0.5f; objBox.minExtents = boxCenter + (objBox.minExtents - boxCenter) * 0.9f; objBox.maxExtents = boxCenter + (objBox.maxExtents - boxCenter) * 0.9f; @@ -1275,7 +1275,7 @@ bool ShapeBase::onNewDataBlock( GameBaseData *dptr, bool reload ) } } - mObjBox = mDataBlock->mShape->bounds; + mObjBox = mDataBlock->mShape->mBounds; resetWorldBox(); // Set the initial mesh hidden state. @@ -2801,7 +2801,7 @@ void ShapeBase::_renderBoundingBox( ObjectRenderInst *ri, SceneRenderState *stat MatrixF mat; getRenderImageTransform( ri->objectIndex, &mat ); - const Box3F &objBox = image.shapeInstance[getImageShapeIndex(image)]->getShape()->bounds; + const Box3F &objBox = image.shapeInstance[getImageShapeIndex(image)]->getShape()->mBounds; drawer->drawCube( desc, objBox, ColorI( 255, 255, 255 ), &mat ); } diff --git a/Engine/source/T3D/tsStatic.cpp b/Engine/source/T3D/tsStatic.cpp index 13964e632..97ae395df 100644 --- a/Engine/source/T3D/tsStatic.cpp +++ b/Engine/source/T3D/tsStatic.cpp @@ -373,7 +373,7 @@ bool TSStatic::_createShape() NetConnection::filesWereDownloaded() ) return false; - mObjBox = mShape->bounds; + mObjBox = mShape->mBounds; resetWorldBox(); mShapeInstance = new TSShapeInstance( mShape, isClientObject() ); diff --git a/Engine/source/T3D/vehicles/wheeledVehicle.cpp b/Engine/source/T3D/vehicles/wheeledVehicle.cpp index 17cfdfe6a..05524867a 100644 --- a/Engine/source/T3D/vehicles/wheeledVehicle.cpp +++ b/Engine/source/T3D/vehicles/wheeledVehicle.cpp @@ -111,7 +111,7 @@ bool WheeledVehicleTire::preload(bool server, String &errorStr) // Determinw wheel radius from the shape's bounding box. // The tire should be built with it's hub axis along the // object's Y axis. - radius = shape->bounds.len_z() / 2; + radius = shape->mBounds.len_z() / 2; } return true; diff --git a/Engine/source/afx/afxMagicMissile.cpp b/Engine/source/afx/afxMagicMissile.cpp index 36ecd1777..1cae8526c 100644 --- a/Engine/source/afx/afxMagicMissile.cpp +++ b/Engine/source/afx/afxMagicMissile.cpp @@ -1116,7 +1116,7 @@ bool afxMagicMissile::onAdd() // Setup our bounding box if (bool(mDataBlock->projectileShape) == true) - mObjBox = mDataBlock->projectileShape->bounds; + mObjBox = mDataBlock->projectileShape->mBounds; else mObjBox = Box3F(Point3F(0, 0, 0), Point3F(0, 0, 0)); resetWorldBox(); diff --git a/Engine/source/afx/ce/afxModel.cpp b/Engine/source/afx/ce/afxModel.cpp index 688cd08ad..6962aea51 100644 --- a/Engine/source/afx/ce/afxModel.cpp +++ b/Engine/source/afx/ce/afxModel.cpp @@ -397,7 +397,7 @@ bool afxModel::onAdd() // setup our bounding box if (mDataBlock->shape) - mObjBox = mDataBlock->shape->bounds; + mObjBox = mDataBlock->shape->mBounds; else mObjBox = Box3F(Point3F(-1, -1, -1), Point3F(1, 1, 1)); diff --git a/Engine/source/environment/VolumetricFog.cpp b/Engine/source/environment/VolumetricFog.cpp index 9235611d1..c000f535b 100644 --- a/Engine/source/environment/VolumetricFog.cpp +++ b/Engine/source/environment/VolumetricFog.cpp @@ -347,7 +347,7 @@ bool VolumetricFog::LoadShape() return false; } - mObjBox = mShape->bounds; + mObjBox = mShape->mBounds; mRadius = mShape->radius; resetWorldBox(); @@ -560,7 +560,7 @@ U32 VolumetricFog::packUpdate(NetConnection *con, U32 mask, BitStream *stream) mShape = ResourceManager::get().load(mShapeName); if (bool(mShape) == false) return retMask; - mObjBox = mShape->bounds; + mObjBox = mShape->mBounds; mRadius = mShape->radius; resetWorldBox(); mObjSize = mWorldBox.getGreatestDiagonalLength(); diff --git a/Engine/source/forest/ts/tsForestItemData.h b/Engine/source/forest/ts/tsForestItemData.h index 46252361b..089da98d5 100644 --- a/Engine/source/forest/ts/tsForestItemData.h +++ b/Engine/source/forest/ts/tsForestItemData.h @@ -88,7 +88,7 @@ public: const Vector& getLOSDetails() const { return mLOSDetails; } // ForestItemData - const Box3F& getObjBox() const { return mShape ? mShape->bounds : Box3F::Zero; } + const Box3F& getObjBox() const { return mShape ? mShape->mBounds : Box3F::Zero; } bool render( TSRenderState *rdata, const ForestItem& item ) const; ForestCellBatch* allocateBatch() const; bool canBillboard( const SceneRenderState *state, const ForestItem &item, F32 distToCamera ) const; diff --git a/Engine/source/gui/editor/guiShapeEdPreview.cpp b/Engine/source/gui/editor/guiShapeEdPreview.cpp index f04ef371a..e373a246b 100644 --- a/Engine/source/gui/editor/guiShapeEdPreview.cpp +++ b/Engine/source/gui/editor/guiShapeEdPreview.cpp @@ -853,7 +853,7 @@ void GuiShapeEdPreview::exportToCollada( const String& path ) if ( mModel ) { MatrixF orientation( true ); - orientation.setPosition( mModel->getShape()->bounds.getCenter() ); + orientation.setPosition( mModel->getShape()->mBounds.getCenter() ); orientation.inverse(); OptimizedPolyList polyList; @@ -1138,8 +1138,8 @@ bool GuiShapeEdPreview::getCameraTransform(MatrixF* cameraMatrix) cameraMatrix->identity(); if ( mModel ) { - Point3F camPos = mModel->getShape()->bounds.getCenter(); - F32 offset = mModel->getShape()->bounds.len(); + Point3F camPos = mModel->getShape()->mBounds.getCenter(); + F32 offset = mModel->getShape()->mBounds.len(); switch (mDisplayType) { @@ -1442,7 +1442,7 @@ void GuiShapeEdPreview::renderWorld(const RectI &updateRect) // Render the shape bounding box if ( mRenderBounds ) { - Point3F boxSize = mModel->getShape()->bounds.maxExtents - mModel->getShape()->bounds.minExtents; + Point3F boxSize = mModel->getShape()->mBounds.maxExtents - mModel->getShape()->mBounds.minExtents; GFXStateBlockDesc desc; desc.fillMode = GFXFillWireframe; @@ -1544,7 +1544,7 @@ void GuiShapeEdPreview::renderSunDirection() const { // Render four arrows aiming in the direction of the sun's light ColorI color = LinearColorF( mFakeSun->getColor()).toColorI(); - F32 length = mModel->getShape()->bounds.len() * 0.8f; + F32 length = mModel->getShape()->mBounds.len() * 0.8f; // Get the sun's vectors Point3F fwd = mFakeSun->getTransform().getForwardVector(); diff --git a/Engine/source/lighting/common/blobShadow.cpp b/Engine/source/lighting/common/blobShadow.cpp index a564ff654..3db211762 100644 --- a/Engine/source/lighting/common/blobShadow.cpp +++ b/Engine/source/lighting/common/blobShadow.cpp @@ -182,7 +182,7 @@ void BlobShadow::setRadius(F32 radius) void BlobShadow::setRadius(TSShapeInstance * shapeInstance, const Point3F & scale) { - const Box3F & bounds = shapeInstance->getShape()->bounds; + const Box3F & bounds = shapeInstance->getShape()->mBounds; F32 dx = 0.5f * (bounds.maxExtents.x-bounds.minExtents.x) * scale.x; F32 dy = 0.5f * (bounds.maxExtents.y-bounds.minExtents.y) * scale.y; F32 dz = 0.5f * (bounds.maxExtents.z-bounds.minExtents.z) * scale.z; diff --git a/Engine/source/ts/loader/tsShapeLoader.cpp b/Engine/source/ts/loader/tsShapeLoader.cpp index 61c183d27..94f5e4fbf 100644 --- a/Engine/source/ts/loader/tsShapeLoader.cpp +++ b/Engine/source/ts/loader/tsShapeLoader.cpp @@ -1220,12 +1220,12 @@ void TSShapeLoader::install() } } - computeBounds(shape->bounds); - if (!shape->bounds.isValidBox()) - shape->bounds = Box3F(1.0f); + computeBounds(shape->mBounds); + if (!shape->mBounds.isValidBox()) + shape->mBounds = Box3F(1.0f); - shape->bounds.getCenter(&shape->center); - shape->radius = (shape->bounds.maxExtents - shape->center).len(); + shape->mBounds.getCenter(&shape->center); + shape->radius = (shape->mBounds.maxExtents - shape->center).len(); shape->tubeRadius = shape->radius; shape->init(); diff --git a/Engine/source/ts/tsCollision.cpp b/Engine/source/ts/tsCollision.cpp index 1d04b409e..f5c2d77b4 100644 --- a/Engine/source/ts/tsCollision.cpp +++ b/Engine/source/ts/tsCollision.cpp @@ -414,7 +414,7 @@ void TSShapeInstance::computeBounds(S32 dl, Box3F & bounds) // use shape bounds for imposter details if (ss < 0) { - bounds = mShape->bounds; + bounds = mShape->mBounds; return; } diff --git a/Engine/source/ts/tsShape.cpp b/Engine/source/ts/tsShape.cpp index 52a77cf9f..649e4e6ba 100644 --- a/Engine/source/ts/tsShape.cpp +++ b/Engine/source/ts/tsShape.cpp @@ -1198,7 +1198,7 @@ void TSShape::assembleShape() tsalloc.get32((S32*)&radius,1); tsalloc.get32((S32*)&tubeRadius,1); tsalloc.get32((S32*)¢er,3); - tsalloc.get32((S32*)&bounds,6); + tsalloc.get32((S32*)&mBounds,6); tsalloc.checkGuard(); @@ -1673,7 +1673,7 @@ void TSShape::disassembleShape() tsalloc.copyToBuffer32((S32*)&radius,1); tsalloc.copyToBuffer32((S32*)&tubeRadius,1); tsalloc.copyToBuffer32((S32*)¢er,3); - tsalloc.copyToBuffer32((S32*)&bounds,6); + tsalloc.copyToBuffer32((S32*)&mBounds,6); tsalloc.setGuard(); @@ -2063,8 +2063,8 @@ void TSShape::createEmptyShape() radius = 0.866025f; tubeRadius = 0.707107f; center.set(0.0f, 0.5f, 0.0f); - bounds.minExtents.set(-0.5f, 0.0f, -0.5f); - bounds.maxExtents.set(0.5f, 1.0f, 0.5f); + mBounds.minExtents.set(-0.5f, 0.0f, -0.5f); + mBounds.maxExtents.set(0.5f, 1.0f, 0.5f); mExporterVersion = 124; mSmallestVisibleSize = 2; diff --git a/Engine/source/ts/tsShape.h b/Engine/source/ts/tsShape.h index e72dd8617..d6196c986 100644 --- a/Engine/source/ts/tsShape.h +++ b/Engine/source/ts/tsShape.h @@ -357,7 +357,7 @@ class TSShape F32 radius; F32 tubeRadius; Point3F center; - Box3F bounds; + Box3F mBounds; /// @} diff --git a/Engine/source/ts/tsShapeConstruct.cpp b/Engine/source/ts/tsShapeConstruct.cpp index dd2a67644..612b5dcf7 100644 --- a/Engine/source/ts/tsShapeConstruct.cpp +++ b/Engine/source/ts/tsShapeConstruct.cpp @@ -1445,7 +1445,7 @@ DefineTSShapeConstructorMethod( getBounds, Box3F, (),, "Get the bounding box for the shape.\n" "@return Bounding box \"minX minY minZ maxX maxY maxZ\"" ) { - return mShape->bounds; + return mShape->mBounds; }} DefineTSShapeConstructorMethod( setBounds, bool, ( Box3F bbox ),, @@ -1457,9 +1457,9 @@ DefineTSShapeConstructorMethod( setBounds, bool, ( Box3F bbox ),, // Set shape bounds TSShape* shape = mShape; - shape->bounds = bbox; - shape->bounds.getCenter( &shape->center ); - shape->radius = ( shape->bounds.maxExtents - shape->center ).len(); + shape->mBounds = bbox; + shape->mBounds.getCenter( &shape->center ); + shape->radius = ( shape->mBounds.maxExtents - shape->center ).len(); shape->tubeRadius = shape->radius; ADD_TO_CHANGE_SET(); @@ -2200,12 +2200,12 @@ void TSShapeConstructor::ChangeSet::write(TSShape* shape, Stream& stream, const for (U32 j = 1; j < cmd.argc; j++) { // Use relative paths when possible - String str( cmd.argv[j] ); - if ( str.startsWith( savePath ) ) - str = str.substr( savePath.length() + 1 ); + String relStr( cmd.argv[j] ); + if (relStr.startsWith( savePath ) ) + relStr = relStr.substr( savePath.length() + 1 ); stream.writeText( ", \"" ); - stream.write( str.length(), str.c_str() ); + stream.write(relStr.length(), relStr.c_str() ); stream.writeText( "\"" ); } }