mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-03 04:20:30 +00:00
whitespace updates
This commit is contained in:
parent
7126b5868a
commit
d90b602e5a
16 changed files with 421 additions and 421 deletions
|
|
@ -76,7 +76,7 @@ bool BtBody::init( PhysicsCollision *shape,
|
|||
AssertFatal( shape, "BtBody::init - Got a null collision shape!" );
|
||||
AssertFatal( dynamic_cast<BtCollision*>( shape ), "BtBody::init - The collision shape is the wrong type!" );
|
||||
AssertFatal( ((BtCollision*)shape)->getShape(), "BtBody::init - Got empty collision shape!" );
|
||||
|
||||
|
||||
// Cleanup any previous actor.
|
||||
_releaseActor();
|
||||
|
||||
|
|
@ -97,20 +97,20 @@ bool BtBody::init( PhysicsCollision *shape,
|
|||
|
||||
btScalar *masses = new btScalar[ btCompound->getNumChildShapes() ];
|
||||
for ( U32 j=0; j < btCompound->getNumChildShapes(); j++ )
|
||||
masses[j] = mass / btCompound->getNumChildShapes();
|
||||
masses[j] = mass / btCompound->getNumChildShapes();
|
||||
|
||||
btVector3 principalInertia;
|
||||
btTransform principal;
|
||||
btCompound->calculatePrincipalAxisTransform( masses, principal, principalInertia );
|
||||
delete [] masses;
|
||||
|
||||
// Create a new compound with the shifted children.
|
||||
btColShape = mCompound = new btCompoundShape();
|
||||
for ( U32 i=0; i < btCompound->getNumChildShapes(); i++ )
|
||||
{
|
||||
btTransform newChildTransform = principal.inverse() * btCompound->getChildTransform(i);
|
||||
mCompound->addChildShape( newChildTransform, btCompound->getChildShape(i) );
|
||||
}
|
||||
// Create a new compound with the shifted children.
|
||||
btColShape = mCompound = new btCompoundShape();
|
||||
for ( U32 i=0; i < btCompound->getNumChildShapes(); i++ )
|
||||
{
|
||||
btTransform newChildTransform = principal.inverse() * btCompound->getChildTransform(i);
|
||||
mCompound->addChildShape( newChildTransform, btCompound->getChildShape(i) );
|
||||
}
|
||||
|
||||
localXfm = btCast<MatrixF>( principal );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue