mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +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);
|
mOwner->getWorldToObj().mulP(pos);
|
||||||
|
|
||||||
min = mMeshAsset->getShape()->bounds.minExtents;
|
min = mMeshAsset->getShape()->mBounds.minExtents;
|
||||||
max = mMeshAsset->getShape()->bounds.maxExtents;
|
max = mMeshAsset->getShape()->mBounds.maxExtents;
|
||||||
|
|
||||||
if (mInterfaceData)
|
if (mInterfaceData)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -669,7 +669,7 @@ bool Debris::onAdd()
|
||||||
// Setup our bounding box
|
// Setup our bounding box
|
||||||
if( mDataBlock->shape )
|
if( mDataBlock->shape )
|
||||||
{
|
{
|
||||||
mObjBox = mDataBlock->shape->bounds;
|
mObjBox = mDataBlock->shape->mBounds;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ void RenderShapeExample::createShape()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the bounding box
|
// Update the bounding box
|
||||||
mObjBox = mShape->bounds;
|
mObjBox = mShape->mBounds;
|
||||||
resetWorldBox();
|
resetWorldBox();
|
||||||
setRenderTransform(mObjToWorld);
|
setRenderTransform(mObjToWorld);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1384,7 +1384,7 @@ bool Explosion::explode()
|
||||||
mEndingMS = U32(mExplosionInstance->getScaledDuration(mExplosionThread) * 1000.0f);
|
mEndingMS = U32(mExplosionInstance->getScaledDuration(mExplosionThread) * 1000.0f);
|
||||||
|
|
||||||
mObjScale.convolve(mDataBlock->explosionScale);
|
mObjScale.convolve(mDataBlock->explosionScale);
|
||||||
mObjBox = mDataBlock->explosionShape->bounds;
|
mObjBox = mDataBlock->explosionShape->mBounds;
|
||||||
resetWorldBox();
|
resetWorldBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1142,7 +1142,7 @@ GroundCoverCell* GroundCover::_generateCell( const Point2I& index,
|
||||||
const F32 typeMaxElevation = mMaxElevation[type];
|
const F32 typeMaxElevation = mMaxElevation[type];
|
||||||
const F32 typeMinElevation = mMinElevation[type];
|
const F32 typeMinElevation = mMinElevation[type];
|
||||||
const bool typeIsShape = mShapeInstances[ type ] != NULL;
|
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];
|
const F32 typeWindScale = mWindScale[type];
|
||||||
StringTableEntry typeLayer = mLayer[type];
|
StringTableEntry typeLayer = mLayer[type];
|
||||||
const bool typeInvertLayer = mInvertLayer[type];
|
const bool typeInvertLayer = mInvertLayer[type];
|
||||||
|
|
|
||||||
|
|
@ -358,7 +358,7 @@ bool PhysicsDebris::onAdd()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup our bounding box
|
// Setup our bounding box
|
||||||
mObjBox = mDataBlock->shape->bounds;
|
mObjBox = mDataBlock->shape->mBounds;
|
||||||
resetWorldBox();
|
resetWorldBox();
|
||||||
|
|
||||||
// Add it to the client scene.
|
// 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
|
//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 );
|
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();
|
colShape = PHYSICSMGR->createCollision();
|
||||||
MatrixF centerXfm(true);
|
MatrixF centerXfm(true);
|
||||||
centerXfm.setPosition(shape->bounds.getCenter());
|
centerXfm.setPosition(shape->mBounds.getCenter());
|
||||||
colShape->addBox(halfWidth, centerXfm);
|
colShape->addBox(halfWidth, centerXfm);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -707,7 +707,7 @@ bool PhysicsShape::_createShape()
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Set the world box.
|
// Set the world box.
|
||||||
mObjBox = db->shape->bounds;
|
mObjBox = db->shape->mBounds;
|
||||||
resetWorldBox();
|
resetWorldBox();
|
||||||
|
|
||||||
// If this is the server and its a client only simulation
|
// If this is the server and its a client only simulation
|
||||||
|
|
|
||||||
|
|
@ -828,7 +828,7 @@ bool Projectile::onAdd()
|
||||||
|
|
||||||
// Setup our bounding box
|
// Setup our bounding box
|
||||||
if (bool(mDataBlock->projectileShape) == true)
|
if (bool(mDataBlock->projectileShape) == true)
|
||||||
mObjBox = mDataBlock->projectileShape->bounds;
|
mObjBox = mDataBlock->projectileShape->mBounds;
|
||||||
else
|
else
|
||||||
mObjBox = Box3F(Point3F(0, 0, 0), Point3F(0, 0, 0));
|
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->computeBounds(collisionDetails.last(), collisionBounds.last());
|
||||||
mShape->getAccelerator(collisionDetails.last());
|
mShape->getAccelerator(collisionDetails.last());
|
||||||
|
|
||||||
if (!mShape->bounds.isContained(collisionBounds.last()))
|
if (!mShape->mBounds.isContained(collisionBounds.last()))
|
||||||
{
|
{
|
||||||
if (!silent_bbox_check)
|
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());
|
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)
|
else if (collisionBounds.last().isValidBox() == false)
|
||||||
{
|
{
|
||||||
if (!silent_bbox_check)
|
if (!silent_bbox_check)
|
||||||
Con::errorf("Error: shape %s-collision detail %d (Collision-%d) bounds box invalid!", shapeName, collisionDetails.size() - 1, collisionDetails.last());
|
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
|
// 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");
|
damageSequence = mShape->findSequence("Damage");
|
||||||
|
|
||||||
//
|
//
|
||||||
F32 w = mShape->bounds.len_y() / 2;
|
F32 w = mShape->mBounds.len_y() / 2;
|
||||||
if (cameraMaxDist < w)
|
if (cameraMaxDist < w)
|
||||||
cameraMaxDist = w;
|
cameraMaxDist = w;
|
||||||
// just parse up the string and collect the remappings in txr_tag_remappings.
|
// 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();
|
MatrixF mat = txfm.getMatrix();
|
||||||
|
|
||||||
Box3F objBox = object->mShape->bounds;
|
Box3F objBox = object->mShape->mBounds;
|
||||||
Point3F boxCenter = (objBox.minExtents + objBox.maxExtents) * 0.5f;
|
Point3F boxCenter = (objBox.minExtents + objBox.maxExtents) * 0.5f;
|
||||||
objBox.minExtents = boxCenter + (objBox.minExtents - boxCenter) * 0.9f;
|
objBox.minExtents = boxCenter + (objBox.minExtents - boxCenter) * 0.9f;
|
||||||
objBox.maxExtents = boxCenter + (objBox.maxExtents - 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();
|
resetWorldBox();
|
||||||
|
|
||||||
// Set the initial mesh hidden state.
|
// Set the initial mesh hidden state.
|
||||||
|
|
@ -2801,7 +2801,7 @@ void ShapeBase::_renderBoundingBox( ObjectRenderInst *ri, SceneRenderState *stat
|
||||||
MatrixF mat;
|
MatrixF mat;
|
||||||
getRenderImageTransform( ri->objectIndex, &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 );
|
drawer->drawCube( desc, objBox, ColorI( 255, 255, 255 ), &mat );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,7 @@ bool TSStatic::_createShape()
|
||||||
NetConnection::filesWereDownloaded() )
|
NetConnection::filesWereDownloaded() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
mObjBox = mShape->bounds;
|
mObjBox = mShape->mBounds;
|
||||||
resetWorldBox();
|
resetWorldBox();
|
||||||
|
|
||||||
mShapeInstance = new TSShapeInstance( mShape, isClientObject() );
|
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.
|
// Determinw wheel radius from the shape's bounding box.
|
||||||
// The tire should be built with it's hub axis along the
|
// The tire should be built with it's hub axis along the
|
||||||
// object's Y axis.
|
// object's Y axis.
|
||||||
radius = shape->bounds.len_z() / 2;
|
radius = shape->mBounds.len_z() / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -1116,7 +1116,7 @@ bool afxMagicMissile::onAdd()
|
||||||
|
|
||||||
// Setup our bounding box
|
// Setup our bounding box
|
||||||
if (bool(mDataBlock->projectileShape) == true)
|
if (bool(mDataBlock->projectileShape) == true)
|
||||||
mObjBox = mDataBlock->projectileShape->bounds;
|
mObjBox = mDataBlock->projectileShape->mBounds;
|
||||||
else
|
else
|
||||||
mObjBox = Box3F(Point3F(0, 0, 0), Point3F(0, 0, 0));
|
mObjBox = Box3F(Point3F(0, 0, 0), Point3F(0, 0, 0));
|
||||||
resetWorldBox();
|
resetWorldBox();
|
||||||
|
|
|
||||||
|
|
@ -397,7 +397,7 @@ bool afxModel::onAdd()
|
||||||
|
|
||||||
// setup our bounding box
|
// setup our bounding box
|
||||||
if (mDataBlock->shape)
|
if (mDataBlock->shape)
|
||||||
mObjBox = mDataBlock->shape->bounds;
|
mObjBox = mDataBlock->shape->mBounds;
|
||||||
else
|
else
|
||||||
mObjBox = Box3F(Point3F(-1, -1, -1), Point3F(1, 1, 1));
|
mObjBox = Box3F(Point3F(-1, -1, -1), Point3F(1, 1, 1));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -347,7 +347,7 @@ bool VolumetricFog::LoadShape()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
mObjBox = mShape->bounds;
|
mObjBox = mShape->mBounds;
|
||||||
mRadius = mShape->radius;
|
mRadius = mShape->radius;
|
||||||
resetWorldBox();
|
resetWorldBox();
|
||||||
|
|
||||||
|
|
@ -560,7 +560,7 @@ U32 VolumetricFog::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
||||||
mShape = ResourceManager::get().load(mShapeName);
|
mShape = ResourceManager::get().load(mShapeName);
|
||||||
if (bool(mShape) == false)
|
if (bool(mShape) == false)
|
||||||
return retMask;
|
return retMask;
|
||||||
mObjBox = mShape->bounds;
|
mObjBox = mShape->mBounds;
|
||||||
mRadius = mShape->radius;
|
mRadius = mShape->radius;
|
||||||
resetWorldBox();
|
resetWorldBox();
|
||||||
mObjSize = mWorldBox.getGreatestDiagonalLength();
|
mObjSize = mWorldBox.getGreatestDiagonalLength();
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ public:
|
||||||
const Vector<S32>& getLOSDetails() const { return mLOSDetails; }
|
const Vector<S32>& getLOSDetails() const { return mLOSDetails; }
|
||||||
|
|
||||||
// ForestItemData
|
// 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;
|
bool render( TSRenderState *rdata, const ForestItem& item ) const;
|
||||||
ForestCellBatch* allocateBatch() const;
|
ForestCellBatch* allocateBatch() const;
|
||||||
bool canBillboard( const SceneRenderState *state, const ForestItem &item, F32 distToCamera ) const;
|
bool canBillboard( const SceneRenderState *state, const ForestItem &item, F32 distToCamera ) const;
|
||||||
|
|
|
||||||
|
|
@ -853,7 +853,7 @@ void GuiShapeEdPreview::exportToCollada( const String& path )
|
||||||
if ( mModel )
|
if ( mModel )
|
||||||
{
|
{
|
||||||
MatrixF orientation( true );
|
MatrixF orientation( true );
|
||||||
orientation.setPosition( mModel->getShape()->bounds.getCenter() );
|
orientation.setPosition( mModel->getShape()->mBounds.getCenter() );
|
||||||
orientation.inverse();
|
orientation.inverse();
|
||||||
|
|
||||||
OptimizedPolyList polyList;
|
OptimizedPolyList polyList;
|
||||||
|
|
@ -1138,8 +1138,8 @@ bool GuiShapeEdPreview::getCameraTransform(MatrixF* cameraMatrix)
|
||||||
cameraMatrix->identity();
|
cameraMatrix->identity();
|
||||||
if ( mModel )
|
if ( mModel )
|
||||||
{
|
{
|
||||||
Point3F camPos = mModel->getShape()->bounds.getCenter();
|
Point3F camPos = mModel->getShape()->mBounds.getCenter();
|
||||||
F32 offset = mModel->getShape()->bounds.len();
|
F32 offset = mModel->getShape()->mBounds.len();
|
||||||
|
|
||||||
switch (mDisplayType)
|
switch (mDisplayType)
|
||||||
{
|
{
|
||||||
|
|
@ -1442,7 +1442,7 @@ void GuiShapeEdPreview::renderWorld(const RectI &updateRect)
|
||||||
// Render the shape bounding box
|
// Render the shape bounding box
|
||||||
if ( mRenderBounds )
|
if ( mRenderBounds )
|
||||||
{
|
{
|
||||||
Point3F boxSize = mModel->getShape()->bounds.maxExtents - mModel->getShape()->bounds.minExtents;
|
Point3F boxSize = mModel->getShape()->mBounds.maxExtents - mModel->getShape()->mBounds.minExtents;
|
||||||
|
|
||||||
GFXStateBlockDesc desc;
|
GFXStateBlockDesc desc;
|
||||||
desc.fillMode = GFXFillWireframe;
|
desc.fillMode = GFXFillWireframe;
|
||||||
|
|
@ -1544,7 +1544,7 @@ void GuiShapeEdPreview::renderSunDirection() const
|
||||||
{
|
{
|
||||||
// Render four arrows aiming in the direction of the sun's light
|
// Render four arrows aiming in the direction of the sun's light
|
||||||
ColorI color = LinearColorF( mFakeSun->getColor()).toColorI();
|
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
|
// Get the sun's vectors
|
||||||
Point3F fwd = mFakeSun->getTransform().getForwardVector();
|
Point3F fwd = mFakeSun->getTransform().getForwardVector();
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ void BlobShadow::setRadius(F32 radius)
|
||||||
|
|
||||||
void BlobShadow::setRadius(TSShapeInstance * shapeInstance, const Point3F & scale)
|
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 dx = 0.5f * (bounds.maxExtents.x-bounds.minExtents.x) * scale.x;
|
||||||
F32 dy = 0.5f * (bounds.maxExtents.y-bounds.minExtents.y) * scale.y;
|
F32 dy = 0.5f * (bounds.maxExtents.y-bounds.minExtents.y) * scale.y;
|
||||||
F32 dz = 0.5f * (bounds.maxExtents.z-bounds.minExtents.z) * scale.z;
|
F32 dz = 0.5f * (bounds.maxExtents.z-bounds.minExtents.z) * scale.z;
|
||||||
|
|
|
||||||
|
|
@ -1220,12 +1220,12 @@ void TSShapeLoader::install()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
computeBounds(shape->bounds);
|
computeBounds(shape->mBounds);
|
||||||
if (!shape->bounds.isValidBox())
|
if (!shape->mBounds.isValidBox())
|
||||||
shape->bounds = Box3F(1.0f);
|
shape->mBounds = Box3F(1.0f);
|
||||||
|
|
||||||
shape->bounds.getCenter(&shape->center);
|
shape->mBounds.getCenter(&shape->center);
|
||||||
shape->radius = (shape->bounds.maxExtents - shape->center).len();
|
shape->radius = (shape->mBounds.maxExtents - shape->center).len();
|
||||||
shape->tubeRadius = shape->radius;
|
shape->tubeRadius = shape->radius;
|
||||||
|
|
||||||
shape->init();
|
shape->init();
|
||||||
|
|
|
||||||
|
|
@ -414,7 +414,7 @@ void TSShapeInstance::computeBounds(S32 dl, Box3F & bounds)
|
||||||
// use shape bounds for imposter details
|
// use shape bounds for imposter details
|
||||||
if (ss < 0)
|
if (ss < 0)
|
||||||
{
|
{
|
||||||
bounds = mShape->bounds;
|
bounds = mShape->mBounds;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1198,7 +1198,7 @@ void TSShape::assembleShape()
|
||||||
tsalloc.get32((S32*)&radius,1);
|
tsalloc.get32((S32*)&radius,1);
|
||||||
tsalloc.get32((S32*)&tubeRadius,1);
|
tsalloc.get32((S32*)&tubeRadius,1);
|
||||||
tsalloc.get32((S32*)¢er,3);
|
tsalloc.get32((S32*)¢er,3);
|
||||||
tsalloc.get32((S32*)&bounds,6);
|
tsalloc.get32((S32*)&mBounds,6);
|
||||||
|
|
||||||
tsalloc.checkGuard();
|
tsalloc.checkGuard();
|
||||||
|
|
||||||
|
|
@ -1673,7 +1673,7 @@ void TSShape::disassembleShape()
|
||||||
tsalloc.copyToBuffer32((S32*)&radius,1);
|
tsalloc.copyToBuffer32((S32*)&radius,1);
|
||||||
tsalloc.copyToBuffer32((S32*)&tubeRadius,1);
|
tsalloc.copyToBuffer32((S32*)&tubeRadius,1);
|
||||||
tsalloc.copyToBuffer32((S32*)¢er,3);
|
tsalloc.copyToBuffer32((S32*)¢er,3);
|
||||||
tsalloc.copyToBuffer32((S32*)&bounds,6);
|
tsalloc.copyToBuffer32((S32*)&mBounds,6);
|
||||||
|
|
||||||
tsalloc.setGuard();
|
tsalloc.setGuard();
|
||||||
|
|
||||||
|
|
@ -2063,8 +2063,8 @@ void TSShape::createEmptyShape()
|
||||||
radius = 0.866025f;
|
radius = 0.866025f;
|
||||||
tubeRadius = 0.707107f;
|
tubeRadius = 0.707107f;
|
||||||
center.set(0.0f, 0.5f, 0.0f);
|
center.set(0.0f, 0.5f, 0.0f);
|
||||||
bounds.minExtents.set(-0.5f, 0.0f, -0.5f);
|
mBounds.minExtents.set(-0.5f, 0.0f, -0.5f);
|
||||||
bounds.maxExtents.set(0.5f, 1.0f, 0.5f);
|
mBounds.maxExtents.set(0.5f, 1.0f, 0.5f);
|
||||||
|
|
||||||
mExporterVersion = 124;
|
mExporterVersion = 124;
|
||||||
mSmallestVisibleSize = 2;
|
mSmallestVisibleSize = 2;
|
||||||
|
|
|
||||||
|
|
@ -357,7 +357,7 @@ class TSShape
|
||||||
F32 radius;
|
F32 radius;
|
||||||
F32 tubeRadius;
|
F32 tubeRadius;
|
||||||
Point3F center;
|
Point3F center;
|
||||||
Box3F bounds;
|
Box3F mBounds;
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1445,7 +1445,7 @@ DefineTSShapeConstructorMethod( getBounds, Box3F, (),,
|
||||||
"Get the bounding box for the shape.\n"
|
"Get the bounding box for the shape.\n"
|
||||||
"@return Bounding box \"minX minY minZ maxX maxY maxZ\"" )
|
"@return Bounding box \"minX minY minZ maxX maxY maxZ\"" )
|
||||||
{
|
{
|
||||||
return mShape->bounds;
|
return mShape->mBounds;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
DefineTSShapeConstructorMethod( setBounds, bool, ( Box3F bbox ),,
|
DefineTSShapeConstructorMethod( setBounds, bool, ( Box3F bbox ),,
|
||||||
|
|
@ -1457,9 +1457,9 @@ DefineTSShapeConstructorMethod( setBounds, bool, ( Box3F bbox ),,
|
||||||
// Set shape bounds
|
// Set shape bounds
|
||||||
TSShape* shape = mShape;
|
TSShape* shape = mShape;
|
||||||
|
|
||||||
shape->bounds = bbox;
|
shape->mBounds = bbox;
|
||||||
shape->bounds.getCenter( &shape->center );
|
shape->mBounds.getCenter( &shape->center );
|
||||||
shape->radius = ( shape->bounds.maxExtents - shape->center ).len();
|
shape->radius = ( shape->mBounds.maxExtents - shape->center ).len();
|
||||||
shape->tubeRadius = shape->radius;
|
shape->tubeRadius = shape->radius;
|
||||||
|
|
||||||
ADD_TO_CHANGE_SET();
|
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++)
|
for (U32 j = 1; j < cmd.argc; j++)
|
||||||
{
|
{
|
||||||
// Use relative paths when possible
|
// Use relative paths when possible
|
||||||
String str( cmd.argv[j] );
|
String relStr( cmd.argv[j] );
|
||||||
if ( str.startsWith( savePath ) )
|
if (relStr.startsWith( savePath ) )
|
||||||
str = str.substr( savePath.length() + 1 );
|
relStr = relStr.substr( savePath.length() + 1 );
|
||||||
|
|
||||||
stream.writeText( ", \"" );
|
stream.writeText( ", \"" );
|
||||||
stream.write( str.length(), str.c_str() );
|
stream.write(relStr.length(), relStr.c_str() );
|
||||||
stream.writeText( "\"" );
|
stream.writeText( "\"" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue