Lexx
05-04-2007 16:11:31
hi guys! What's happened with shapeGroup class in NxOgre 0.6? I see realization in nxOgre_shape_compound.cpp, but it's disabled by #if 0 definition... Any info about it?
Lexx
05-04-2007 16:11:31
betajaen
05-04-2007 16:26:13
mBody = mScene->createBody(...., new cubeShape(1));
mBody->addShape(new cubeShape(Vector3(1,1,1), Pose(0,4,0));
mBody->addShape(...);
Lexx
05-04-2007 16:39:04
Lexx
05-04-2007 18:49:44
mBody = mScene->createBody(...., new cubeShape(1));
mBody->addShape(new cubeShape(Vector3(1,1,1), Pose(0,4,0));
mBody->addShape(...);
void body::addShape(shape *_shape) {
......
if (_shape->mType == shape::SHAPE_GROUND) {
mActor->createShape(static_cast<groundShape*>(_shape)->mShapeDesc);
}
if (_shape->mType == shape::SHAPE_PLANE) {
mActor->createShape(static_cast<planeShape*>(_shape)->mShapeDesc);
}
......
void body::addShape(shape * _shape)
{
//NxReal m = mActor->getMass();
// push back shape thing here.
// mActor->updateMassFromShapes(0,m);
NxReal mass = mActor->getMass();
_shape->__bindToNxActor(this,mActor);
mShape.push_back(_shape);
if( _shape->isDynamic() )
{
mDynamicShape.push_back(_shape);
}
mActor->updateMassFromShapes(0, mass);
}
void cubeShape::__bindToNxActor(body * b, NxActor * actor)
{
NxShape * pNxshape = actor->createShape(mShapeDesc);
__bindNxShape(pNxshape);
}
betajaen
05-04-2007 19:37:53