20 #include "physphere.h"
21 #include "private/phyobjectprivate.h"
22 #include "private/worldprivate.h"
29 w->pushObject(
this );
35 #ifdef WORLDSIM_USE_NEWTON
41 #ifdef WORLDSIM_USE_NEWTON
42 NewtonCollision* c = NewtonCreateSphere( worldpriv->world, radiusv, radiusv, radiusv, 1, 0 );
44 priv->body = NewtonCreateBody( worldpriv->world, c, &initialTransformationMatrix[0][0] );
45 priv->collision = NewtonBodyGetCollision(
priv->body );
47 NewtonBodySetAutoSleep(
priv->body, 0 );
49 NewtonBodySetUserData(
priv->body,
this );
50 NewtonBodySetLinearDamping(
priv->body, 0.0 );
52 NewtonBodySetAngularDamping(
priv->body, &zero[0] );
53 NewtonBodySetAutoSleep(
priv->body, 0 );
54 NewtonBodySetFreezeState(
priv->body, 0 );
56 NewtonBodySetTransformCallback(
priv->body, (PhyObjectPrivate::setTransformHandler) );
57 NewtonBodySetForceAndTorqueCallback(
priv->body, (PhyObjectPrivate::applyForceAndTorqueHandler) );