mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-25 06:15:36 +00:00
bounds to mBounds conflict avoidance
This commit is contained in:
parent
f08339c534
commit
242a51eefe
22 changed files with 50 additions and 50 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -669,7 +669,7 @@ bool Debris::onAdd()
|
|||
// Setup our bounding box
|
||||
if( mDataBlock->shape )
|
||||
{
|
||||
mObjBox = mDataBlock->shape->bounds;
|
||||
mObjBox = mDataBlock->shape->mBounds;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ void RenderShapeExample::createShape()
|
|||
}
|
||||
|
||||
// Update the bounding box
|
||||
mObjBox = mShape->bounds;
|
||||
mObjBox = mShape->mBounds;
|
||||
resetWorldBox();
|
||||
setRenderTransform(mObjToWorld);
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ bool TSStatic::_createShape()
|
|||
NetConnection::filesWereDownloaded() )
|
||||
return false;
|
||||
|
||||
mObjBox = mShape->bounds;
|
||||
mObjBox = mShape->mBounds;
|
||||
resetWorldBox();
|
||||
|
||||
mShapeInstance = new TSShapeInstance( mShape, isClientObject() );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue