phycompoundobject.cpp
27 PhyCompoundObject::PhyCompoundObject( QVector<PhyObject*> objs, World* w, QString name, const wMatrix& tm )
46 NewtonCollision* copyCollisionHelper( NewtonWorld* world, NewtonCollision* toCopy, const wMatrix& offsetMatrix ) {
51 return NewtonCreateBox( world, collisionInfo.m_box.m_x, collisionInfo.m_box.m_y, collisionInfo.m_box.m_z, 1, &offsetMatrix[0][0] );
53 return NewtonCreateCone( world, collisionInfo.m_cone.m_r, collisionInfo.m_cone.m_height, 1, &offsetMatrix[0][0] );
55 return NewtonCreateSphere( world, collisionInfo.m_sphere.m_r0, collisionInfo.m_sphere.m_r1, collisionInfo.m_sphere.m_r2, 1, &offsetMatrix[0][0] );
57 return NewtonCreateCapsule( world, collisionInfo.m_capsule.m_r0, collisionInfo.m_capsule.m_height, 1, &offsetMatrix[0][0] );
59 return NewtonCreateCylinder( world, collisionInfo.m_cylinder.m_r0, collisionInfo.m_cylinder.m_height, 1, &offsetMatrix[0][0] );
61 qFatal( "A Primitive not supported by copyCollisionHelper has been used in creating a CompoundObject" );
74 temp[i] = copyCollisionHelper( worldpriv->world, bodyv[i]->priv->collision, bodyv[i]->matrix() );
79 wMatrix initialTransformationMatrix = wMatrix::identity(); // The transformation matrix is set in other places
100 NewtonBodySetForceAndTorqueCallback( priv->body, (PhyObjectPrivate::applyForceAndTorqueHandler) );