21 #include "private/phyobjectprivate.h"
22 #include "private/worldprivate.h"
30 w->pushObject(
this );
36 #ifdef WORLDSIM_USE_NEWTON
42 #ifdef WORLDSIM_USE_NEWTON
43 NewtonCollision* c = NewtonCreateCone( worldpriv->world, radiusv, heightv, 1, 0 );
45 priv->body = NewtonCreateBody( worldpriv->world, c, &initialTransformationMatrix[0][0] );
46 priv->collision = NewtonBodyGetCollision(
priv->body );
48 NewtonBodySetAutoSleep(
priv->body, 0 );
50 NewtonBodySetUserData(
priv->body,
this );
51 NewtonBodySetLinearDamping(
priv->body, 0.0 );
53 NewtonBodySetAngularDamping(
priv->body, &zero[0] );
54 NewtonBodySetAutoSleep(
priv->body, 0 );
55 NewtonBodySetFreezeState(
priv->body, 0 );
57 NewtonBodySetTransformCallback(
priv->body, (PhyObjectPrivate::setTransformHandler) );
58 NewtonBodySetForceAndTorqueCallback(
priv->body, (PhyObjectPrivate::applyForceAndTorqueHandler) );
static wMatrix identity()
create an identity matrix
void setMass(real)
Set the mass without touching the Inertia data.
PhyCone(real radius, real height, World *world, QString name="unamed", const wMatrix &tm=wMatrix::identity())
Create a physics cone object and insert it in the world passed.
real radius() const
return the radius
real height() const
return the height
PhyObjectPrivate * priv
Engine encapsulation.
virtual ~PhyCone()
Destroy this object.
void createPrivateObject()
Engine encapsulation.
virtual void changedMatrix()
syncronize this object with underlying physic object