Revert recent style cleanup changes.

This commit is contained in:
Daniel Buckmaster 2015-03-04 11:55:30 +11:00
parent a73850a4bb
commit 84e8cbb4ee
62 changed files with 3380 additions and 3380 deletions

View file

@ -573,7 +573,7 @@ bool Debris::onAdd()
// Setup our bounding box
if( mDataBlock->shape )
{
mObjBox = mDataBlock->shape->mBounds;
mObjBox = mDataBlock->shape->bounds;
}
else
{

View file

@ -213,7 +213,7 @@ void RenderShapeExample::createShape()
}
// Update the bounding box
mObjBox = mShape->mBounds;
mObjBox = mShape->bounds;
resetWorldBox();
setRenderTransform(mObjToWorld);

View file

@ -1252,7 +1252,7 @@ bool Explosion::explode()
mEndingMS = U32(mExplosionInstance->getScaledDuration(mExplosionThread) * 1000.0f);
mObjScale.convolve(mDataBlock->explosionScale);
mObjBox = mDataBlock->explosionShape->mBounds;
mObjBox = mDataBlock->explosionShape->bounds;
resetWorldBox();
}

View file

@ -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()->mBounds : Box3F();
const Box3F typeShapeBounds = typeIsShape ? mShapeInstances[ type ]->getShape()->bounds : Box3F();
const F32 typeWindScale = mWindScale[type];
StringTableEntry typeLayer = mLayer[type];
const bool typeInvertLayer = mInvertLayer[type];

View file

@ -268,8 +268,8 @@ void GuiMaterialPreview::setObjectModel(const char* modelName)
AssertFatal(mModel, avar("GuiMaterialPreview: Failed to load model %s. Please check your model name and load a valid model.", modelName));
// Initialize camera values:
mOrbitPos = mModel->getShape()->mCenter;
mMinOrbitDist = mModel->getShape()->mRadius;
mOrbitPos = mModel->getShape()->center;
mMinOrbitDist = mModel->getShape()->radius;
lastRenderTime = Platform::getVirtualMilliseconds();
}
@ -434,7 +434,7 @@ void GuiMaterialPreview::resetViewport()
mCameraRot.set( mDegToRad(30.0f), 0, mDegToRad(-30.0f) );
mCameraPos.set(0.0f, 1.75f, 1.25f);
mOrbitDist = 5.0f;
mOrbitPos = mModel->getShape()->mCenter;
mOrbitPos = mModel->getShape()->center;
// Reset the viewport's lighting.
GuiMaterialPreview::mFakeSun->setColor( ColorF( 1.0f, 1.0f, 1.0f ) );

View file

@ -366,8 +366,8 @@ void GuiObjectView::setObjectModel( const String& modelName )
// Initialize camera values.
mOrbitPos = mModel->getShape()->mCenter;
mMinOrbitDist = mModel->getShape()->mRadius;
mOrbitPos = mModel->getShape()->center;
mMinOrbitDist = mModel->getShape()->radius;
// Initialize animation.
@ -645,7 +645,7 @@ void GuiObjectView::_initAnimation()
if( mAnimationSeq != -1 )
{
if( mAnimationSeq >= mModel->getShape()->mSequences.size() )
if( mAnimationSeq >= mModel->getShape()->sequences.size() )
{
Con::errorf( "GuiObjectView::_initAnimation - Sequence '%i' out of range for model '%s'",
mAnimationSeq,
@ -694,7 +694,7 @@ void GuiObjectView::_initMount()
// Make sure mount node is valid.
if( mMountNode != -1 && mMountNode >= mModel->getShape()->mNodes.size() )
if( mMountNode != -1 && mMountNode >= mModel->getShape()->nodes.size() )
{
Con::errorf( "GuiObjectView::_initMount - Mount node index '%i' out of range for '%s'",
mMountNode,

View file

@ -358,7 +358,7 @@ bool PhysicsDebris::onAdd()
}
// Setup our bounding box
mObjBox = mDataBlock->shape->mBounds;
mObjBox = mDataBlock->shape->bounds;
resetWorldBox();
// Add it to the client scene.
@ -696,20 +696,20 @@ void PhysicsDebris::_findNodes( U32 colNode, Vector<U32> &nodeIds )
// 2. Collision node is a child of its visible mesh node
TSShape *shape = mDataBlock->shape;
S32 itr = shape->mNodes[colNode].parentIndex;
itr = shape->mNodes[itr].firstChild;
S32 itr = shape->nodes[colNode].parentIndex;
itr = shape->nodes[itr].firstChild;
while ( itr != -1 )
{
if ( itr != colNode )
nodeIds.push_back(itr);
itr = shape->mNodes[itr].nextSibling;
itr = shape->nodes[itr].nextSibling;
}
// If we didn't find any siblings of the collision node we assume
// it is case #2 and the collision nodes direct parent is the visible mesh.
if ( nodeIds.size() == 0 && shape->mNodes[colNode].parentIndex != -1 )
nodeIds.push_back( shape->mNodes[colNode].parentIndex );
if ( nodeIds.size() == 0 && shape->nodes[colNode].parentIndex != -1 )
nodeIds.push_back( shape->nodes[colNode].parentIndex );
}
extern bool gEditingMission;

View file

@ -698,7 +698,7 @@ bool PhysicsShape::_createShape()
return false;
// Set the world box.
mObjBox = db->shape->mBounds;
mObjBox = db->shape->bounds;
resetWorldBox();
// If this is the server and its a client only simulation

View file

@ -489,12 +489,12 @@ bool PlayerData::preload(bool server, String &errorStr)
if (dp->sequence != -1)
getGroundInfo(si,thread,dp);
}
for (S32 b = 0; b < mShape->mSequences.size(); b++)
for (S32 b = 0; b < mShape->sequences.size(); b++)
{
if (!isTableSequence(b))
{
dp->sequence = b;
dp->name = mShape->getName(mShape->mSequences[b].nameIndex);
dp->name = mShape->getName(mShape->sequences[b].nameIndex);
dp->velocityScale = false;
getGroundInfo(si,thread,dp++);
}
@ -614,7 +614,7 @@ void PlayerData::getGroundInfo(TSShapeInstance* si, TSThread* thread,ActionAnima
dp->dir.set(0.0f, 0.0f, 0.0f);
// Death animations MUST define ground transforms, so add dummy ones if required
if (si->getShape()->mSequences[dp->sequence].numGroundFrames == 0)
if (si->getShape()->sequences[dp->sequence].numGroundFrames == 0)
si->getShape()->setSequenceGroundSpeed(dp->name, Point3F(0, 0, 0), Point3F(0, 0, 0));
}
else

View file

@ -771,7 +771,7 @@ bool Projectile::onAdd()
// Setup our bounding box
if (bool(mDataBlock->projectileShape) == true)
mObjBox = mDataBlock->projectileShape->mBounds;
mObjBox = mDataBlock->projectileShape->bounds;
else
mObjBox = Box3F(Point3F(0, 0, 0), Point3F(0, 0, 0));

View file

@ -323,9 +323,9 @@ bool ShapeBaseData::preload(bool server, String &errorStr)
// Resolve details and camera node indexes.
static const String sCollisionStr( "collision-" );
for (i = 0; i < mShape->mDetails.size(); i++)
for (i = 0; i < mShape->details.size(); i++)
{
const String &name = mShape->mNames[mShape->mDetails[i].nameIndex];
const String &name = mShape->names[mShape->details[i].nameIndex];
if (name.compare( sCollisionStr, sCollisionStr.length(), String::NoCase ) == 0)
{
@ -335,15 +335,15 @@ bool ShapeBaseData::preload(bool server, String &errorStr)
mShape->computeBounds(collisionDetails.last(), collisionBounds.last());
mShape->getAccelerator(collisionDetails.last());
if (!mShape->mBounds.isContained(collisionBounds.last()))
if (!mShape->bounds.isContained(collisionBounds.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->mBounds;
collisionBounds.last() = mShape->bounds;
}
else if (collisionBounds.last().isValidBox() == false)
{
Con::errorf("Error: shape %s-collision detail %d (Collision-%d) bounds box invalid!", shapeName, collisionDetails.size() - 1, collisionDetails.last());
collisionBounds.last() = mShape->mBounds;
collisionBounds.last() = mShape->bounds;
}
// The way LOS works is that it will check to see if there is a LOS detail that matches
@ -364,9 +364,9 @@ bool ShapeBaseData::preload(bool server, String &errorStr)
// Snag any "unmatched" LOS details
static const String sLOSStr( "LOS-" );
for (i = 0; i < mShape->mDetails.size(); i++)
for (i = 0; i < mShape->details.size(); i++)
{
const String &name = mShape->mNames[mShape->mDetails[i].nameIndex];
const String &name = mShape->names[mShape->details[i].nameIndex];
if (name.compare( sLOSStr, sLOSStr.length(), String::NoCase ) == 0)
{
@ -410,7 +410,7 @@ bool ShapeBaseData::preload(bool server, String &errorStr)
damageSequence = mShape->findSequence("Damage");
//
F32 w = mShape->mBounds.len_y() / 2;
F32 w = mShape->bounds.len_y() / 2;
if (cameraMaxDist < w)
cameraMaxDist = w;
}
@ -606,7 +606,7 @@ DefineEngineMethod( ShapeBaseData, checkDeployPos, bool, ( TransformF txfm ),,
MatrixF mat = txfm.getMatrix();
Box3F objBox = object->mShape->mBounds;
Box3F objBox = object->mShape->bounds;
Point3F boxCenter = (objBox.minExtents + objBox.maxExtents) * 0.5f;
objBox.minExtents = boxCenter + (objBox.minExtents - boxCenter) * 0.9f;
objBox.maxExtents = boxCenter + (objBox.maxExtents - boxCenter) * 0.9f;
@ -1097,11 +1097,11 @@ bool ShapeBase::onNewDataBlock( GameBaseData *dptr, bool reload )
if (isClientObject())
mShapeInstance->cloneMaterialList();
mObjBox = mDataBlock->mShape->mBounds;
mObjBox = mDataBlock->mShape->bounds;
resetWorldBox();
// Set the initial mesh hidden state.
mMeshHidden.setSize( mDataBlock->mShape->mObjects.size() );
mMeshHidden.setSize( mDataBlock->mShape->objects.size() );
mMeshHidden.clear();
// Initialize the threads
@ -1126,8 +1126,8 @@ bool ShapeBase::onNewDataBlock( GameBaseData *dptr, bool reload )
AssertFatal( prevDB != NULL, "ShapeBase::onNewDataBlock - how did you have a sequence playing without a prior datablock?" );
const TSShape *prevShape = prevDB->mShape;
const TSShape::Sequence &prevSeq = prevShape->mSequences[st.sequence];
const String &prevSeqName = prevShape->mNames[prevSeq.nameIndex];
const TSShape::Sequence &prevSeq = prevShape->sequences[st.sequence];
const String &prevSeqName = prevShape->names[prevSeq.nameIndex];
st.sequence = mDataBlock->mShape->findSequence( prevSeqName );
@ -2123,7 +2123,7 @@ const char *ShapeBase::getThreadSequenceName( U32 slot )
}
// Name Index
const U32 nameIndex = getShape()->mSequences[st.sequence].nameIndex;
const U32 nameIndex = getShape()->sequences[st.sequence].nameIndex;
// Return Name.
return getShape()->getName( nameIndex );
@ -2309,7 +2309,7 @@ void ShapeBase::advanceThreads(F32 dt)
for (U32 i = 0; i < MaxScriptThreads; i++) {
Thread& st = mScriptThread[i];
if (st.thread) {
if (!mShapeInstance->getShape()->mSequences[st.sequence].isCyclic() && !st.atEnd &&
if (!mShapeInstance->getShape()->sequences[st.sequence].isCyclic() && !st.atEnd &&
( ( st.timescale > 0.f )? mShapeInstance->getPos(st.thread) >= 1.0:
mShapeInstance->getPos(st.thread) <= 0)) {
st.atEnd = true;
@ -2589,7 +2589,7 @@ void ShapeBase::_renderBoundingBox( ObjectRenderInst *ri, SceneRenderState *stat
MatrixF mat;
getRenderImageTransform( ri->objectIndex, &mat );
const Box3F &objBox = image.shapeInstance[getImageShapeIndex(image)]->getShape()->mBounds;
const Box3F &objBox = image.shapeInstance[getImageShapeIndex(image)]->getShape()->bounds;
drawer->drawCube( desc, objBox, ColorI( 255, 255, 255 ), &mat );
}
@ -3277,17 +3277,17 @@ void ShapeBaseConvex::findNodeTransform()
TSShapeInstance* si = pShapeBase->getShapeInstance();
TSShape* shape = si->getShape();
const TSShape::Detail* detail = &shape->mDetails[dl];
const TSShape::Detail* detail = &shape->details[dl];
const S32 subs = detail->subShapeNum;
const S32 start = shape->mSubShapeFirstObject[subs];
const S32 end = start + shape->mSubShapeNumObjects[subs];
const S32 start = shape->subShapeFirstObject[subs];
const S32 end = start + shape->subShapeNumObjects[subs];
// Find the first object that contains a mesh for this
// detail level. There should only be one mesh per
// collision detail level.
for (S32 i = start; i < end; i++)
{
const TSShape::Object* obj = &shape->mObjects[i];
const TSShape::Object* obj = &shape->objects[i];
if (obj->numMeshes && detail->objectDetailNum < obj->numMeshes)
{
nodeTransform = &si->mNodeTransforms[obj->nodeIndex];
@ -4857,7 +4857,7 @@ DefineEngineMethod( ShapeBase, changeMaterial, void, ( const char* mapTo, Materi
ShapeBase *clientObj = dynamic_cast< ShapeBase* > ( object->getClientObject() );
// Check the mapTo name exists for this shape
S32 matIndex = serverObj->getShape()->mMaterialList->getMaterialNameList().find_next(String(mapTo));
S32 matIndex = serverObj->getShape()->materialList->getMaterialNameList().find_next(String(mapTo));
if (matIndex < 0)
{
Con::errorf("ShapeBase::changeMaterial failed: Invalid mapTo name '%s'", mapTo);
@ -4876,19 +4876,19 @@ DefineEngineMethod( ShapeBase, changeMaterial, void, ( const char* mapTo, Materi
// Replace instances with the new material being traded in. For ShapeBase
// class we have to update the server/client objects separately so both
// represent our changes
delete serverObj->getShape()->mMaterialList->mMatInstList[matIndex];
serverObj->getShape()->mMaterialList->mMatInstList[matIndex] = newMat->createMatInstance();
delete serverObj->getShape()->materialList->mMatInstList[matIndex];
serverObj->getShape()->materialList->mMatInstList[matIndex] = newMat->createMatInstance();
if (clientObj)
{
delete clientObj->getShape()->mMaterialList->mMatInstList[matIndex];
clientObj->getShape()->mMaterialList->mMatInstList[matIndex] = newMat->createMatInstance();
delete clientObj->getShape()->materialList->mMatInstList[matIndex];
clientObj->getShape()->materialList->mMatInstList[matIndex] = newMat->createMatInstance();
}
// Finish up preparing the material instances for rendering
const GFXVertexFormat *flags = getGFXVertexFormat<GFXVertexPNTTB>();
FeatureSet features = MATMGR->getDefaultFeatures();
serverObj->getShape()->mMaterialList->getMaterialInst(matIndex)->init( features, flags );
serverObj->getShape()->materialList->getMaterialInst(matIndex)->init( features, flags );
if (clientObj)
clientObj->getShapeInstance()->mMaterialList->getMaterialInst(matIndex)->init( features, flags );
}

View file

@ -497,9 +497,9 @@ bool ShapeBaseImageData::preload(bool server, String &errorStr)
do {
MatrixF nmat;
QuatF q;
TSTransform::setMatrix(shape[i]->mDefaultRotations[node].getQuatF(&q),shape[i]->mDefaultTranslations[node],&nmat);
TSTransform::setMatrix(shape[i]->defaultRotations[node].getQuatF(&q),shape[i]->defaultTranslations[node],&nmat);
total.mul(nmat);
node = shape[i]->mNodes[node].parentIndex;
node = shape[i]->nodes[node].parentIndex;
}
while(node != -1);
total.inverse();

View file

@ -334,7 +334,7 @@ bool TSStatic::_createShape()
NetConnection::filesWereDownloaded() )
return false;
mObjBox = mShape->mBounds;
mObjBox = mShape->bounds;
resetWorldBox();
mShapeInstance = new TSShapeInstance( mShape, isClientObject() );
@ -391,7 +391,7 @@ void TSStatic::_updatePhysics()
if ( mCollisionType == Bounds )
{
MatrixF offset( true );
offset.setPosition( mShape->mCenter );
offset.setPosition( mShape->center );
colShape = PHYSICSMGR->createCollision();
colShape->addBox( getObjBox().getExtents() * 0.5f * mObjScale, offset );
}
@ -960,31 +960,31 @@ void TSStatic::buildConvex(const Box3F& box, Convex* convex)
SceneObject* TSStaticPolysoupConvex::smCurObject = NULL;
TSStaticPolysoupConvex::TSStaticPolysoupConvex()
: mBox( 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f ),
mNormal( 0.0f, 0.0f, 0.0f, 0.0f ),
mIdx( 0 ),
mMesh( NULL )
: box( 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f ),
normal( 0.0f, 0.0f, 0.0f, 0.0f ),
idx( 0 ),
mesh( NULL )
{
mType = TSPolysoupConvexType;
for ( U32 i = 0; i < 4; ++i )
{
mVerts[i].set( 0.0f, 0.0f, 0.0f );
verts[i].set( 0.0f, 0.0f, 0.0f );
}
}
Point3F TSStaticPolysoupConvex::support(const VectorF& vec) const
{
F32 bestDot = mDot( mVerts[0], vec );
F32 bestDot = mDot( verts[0], vec );
const Point3F *bestP = &mVerts[0];
const Point3F *bestP = &verts[0];
for(S32 i=1; i<4; i++)
{
F32 newD = mDot(mVerts[i], vec);
F32 newD = mDot(verts[i], vec);
if(newD > bestDot)
{
bestDot = newD;
bestP = &mVerts[i];
bestP = &verts[i];
}
}
@ -993,7 +993,7 @@ Point3F TSStaticPolysoupConvex::support(const VectorF& vec) const
Box3F TSStaticPolysoupConvex::getBoundingBox() const
{
Box3F wbox = mBox;
Box3F wbox = box;
wbox.minExtents.convolve( mObject->getScale() );
wbox.maxExtents.convolve( mObject->getScale() );
mObject->getTransform().mul(wbox);
@ -1003,7 +1003,7 @@ Box3F TSStaticPolysoupConvex::getBoundingBox() const
Box3F TSStaticPolysoupConvex::getBoundingBox(const MatrixF& mat, const Point3F& scale) const
{
AssertISV(false, "TSStaticPolysoupConvex::getBoundingBox(m,p) - Not implemented. -- XEA");
return mBox;
return box;
}
void TSStaticPolysoupConvex::getPolyList(AbstractPolyList *list)
@ -1015,11 +1015,11 @@ void TSStaticPolysoupConvex::getPolyList(AbstractPolyList *list)
list->setObject(mObject);
// Add only the original collision triangle
S32 base = list->addPoint(mVerts[0]);
list->addPoint(mVerts[2]);
list->addPoint(mVerts[1]);
S32 base = list->addPoint(verts[0]);
list->addPoint(verts[2]);
list->addPoint(verts[1]);
list->begin(0, (U32)mIdx ^ (uintptr_t)mMesh);
list->begin(0, (U32)idx ^ (uintptr_t)mesh);
list->vertex(base + 2);
list->vertex(base + 1);
list->vertex(base + 0);
@ -1035,10 +1035,10 @@ void TSStaticPolysoupConvex::getFeatures(const MatrixF& mat,const VectorF& n, Co
// For a tetrahedron this is pretty easy... first
// convert everything into world space.
Point3F tverts[4];
mat.mulP(mVerts[0], &tverts[0]);
mat.mulP(mVerts[1], &tverts[1]);
mat.mulP(mVerts[2], &tverts[2]);
mat.mulP(mVerts[3], &tverts[3]);
mat.mulP(verts[0], &tverts[0]);
mat.mulP(verts[1], &tverts[1]);
mat.mulP(verts[2], &tverts[2]);
mat.mulP(verts[3], &tverts[3]);
// points...
S32 firstVert = cf->mVertexList.size();
@ -1172,7 +1172,7 @@ DefineEngineMethod( TSStatic, changeMaterial, void, ( const char* mapTo, Materia
}
// Check the mapTo name exists for this shape
S32 matIndex = object->getShape()->mMaterialList->getMaterialNameList().find_next(String(mapTo));
S32 matIndex = object->getShape()->materialList->getMaterialNameList().find_next(String(mapTo));
if (matIndex < 0)
{
Con::errorf("TSShape::changeMaterial failed: Invalid mapTo name '%s'", mapTo);
@ -1190,13 +1190,13 @@ DefineEngineMethod( TSStatic, changeMaterial, void, ( const char* mapTo, Materia
// Replace instances with the new material being traded in. Lets make sure that we only
// target the specific targets per inst, this is actually doing more than we thought
delete object->getShape()->mMaterialList->mMatInstList[matIndex];
object->getShape()->mMaterialList->mMatInstList[matIndex] = newMat->createMatInstance();
delete object->getShape()->materialList->mMatInstList[matIndex];
object->getShape()->materialList->mMatInstList[matIndex] = newMat->createMatInstance();
// Finish up preparing the material instances for rendering
const GFXVertexFormat *flags = getGFXVertexFormat<GFXVertexPNTTB>();
FeatureSet features = MATMGR->getDefaultFeatures();
object->getShape()->mMaterialList->getMaterialInst(matIndex)->init( features, flags );
object->getShape()->materialList->getMaterialInst(matIndex)->init( features, flags );
}
DefineEngineMethod( TSStatic, getModelFile, const char *, (),,

View file

@ -56,11 +56,11 @@ public:
~TSStaticPolysoupConvex() {};
public:
Box3F mBox;
Point3F mVerts[4];
PlaneF mNormal;
S32 mIdx;
TSMesh *mMesh;
Box3F box;
Point3F verts[4];
PlaneF normal;
S32 idx;
TSMesh *mesh;
static SceneObject* smCurObject;

View file

@ -823,8 +823,8 @@ void TurretShape::_updateNodes(const Point3F& rot)
if (node != -1)
{
MatrixF* mat = &mShapeInstance->mNodeTransforms[node];
Point3F defaultPos = mShapeInstance->getShape()->mDefaultTranslations[node];
Quat16 defaultRot = mShapeInstance->getShape()->mDefaultRotations[node];
Point3F defaultPos = mShapeInstance->getShape()->defaultTranslations[node];
Quat16 defaultRot = mShapeInstance->getShape()->defaultRotations[node];
QuatF qrot(zRot);
qrot *= defaultRot.getQuatF();
@ -837,8 +837,8 @@ void TurretShape::_updateNodes(const Point3F& rot)
if (node != -1)
{
MatrixF* mat = &mShapeInstance->mNodeTransforms[node];
Point3F defaultPos = mShapeInstance->getShape()->mDefaultTranslations[node];
Quat16 defaultRot = mShapeInstance->getShape()->mDefaultRotations[node];
Point3F defaultPos = mShapeInstance->getShape()->defaultTranslations[node];
Quat16 defaultRot = mShapeInstance->getShape()->defaultRotations[node];
QuatF qrot(xRot);
qrot *= defaultRot.getQuatF();
@ -853,8 +853,8 @@ void TurretShape::_updateNodes(const Point3F& rot)
if (node != -1)
{
MatrixF* mat = &mShapeInstance->mNodeTransforms[node];
Point3F defaultPos = mShapeInstance->getShape()->mDefaultTranslations[node];
Quat16 defaultRot = mShapeInstance->getShape()->mDefaultRotations[node];
Point3F defaultPos = mShapeInstance->getShape()->defaultTranslations[node];
Quat16 defaultRot = mShapeInstance->getShape()->defaultRotations[node];
QuatF qrot(xRot);
qrot *= defaultRot.getQuatF();
@ -866,8 +866,8 @@ void TurretShape::_updateNodes(const Point3F& rot)
if (node != -1)
{
MatrixF* mat = &mShapeInstance->mNodeTransforms[node];
Point3F defaultPos = mShapeInstance->getShape()->mDefaultTranslations[node];
Quat16 defaultRot = mShapeInstance->getShape()->mDefaultRotations[node];
Point3F defaultPos = mShapeInstance->getShape()->defaultTranslations[node];
Quat16 defaultRot = mShapeInstance->getShape()->defaultRotations[node];
QuatF qrot(zRot);
qrot *= defaultRot.getQuatF();

View file

@ -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->mBounds.len_z() / 2;
radius = shape->bounds.len_z() / 2;
}
return true;
@ -399,8 +399,8 @@ bool WheeledVehicleData::preload(bool server, String &errorStr)
if (collisionDetails[0] != -1) {
MatrixF imat(1);
SphereF sphere;
sphere.center = mShape->mCenter;
sphere.radius = mShape->mRadius;
sphere.center = mShape->center;
sphere.radius = mShape->radius;
PlaneExtractorPolyList polyList;
polyList.mPlaneList = &rigidBody.mPlaneList;
polyList.setTransform(&imat, Point3F(1,1,1));