7 #include <osg\PositionAttitudeTransform>
11 #pragma comment(lib, "PhysXLoader.lib")
13 namespace APDYNAMICART
23 void releasePhysics();
26 void getPhysicsResult();
29 NxActor** getActors();
33 void setSphericalJoint(
const osg::Vec3& point,
HoopPtr hoop);
35 void releaseActor(
HoopPtr hoop);
38 inline NxQuat toNxQuat(
const osg::Quat &qRot );
39 inline NxVec3 toNxVec3(
const osg::Vec3& point );
40 inline NxVec3 transformToLocalCoord( NxActor* actor,
const NxVec3& point );
42 NxPhysicsSDK* _physicsSDK;
46 std::vector<NxJoint*> _joints;
48 std::map<HoopPtr, NxActor*> _actors;
51 NxQuat PhysXModule::toNxQuat(
const osg::Quat &qRot )
62 NxVec3 PhysXModule::toNxVec3(
const osg::Vec3& point )
67 NxVec3 PhysXModule::transformToLocalCoord( NxActor* actor,
const NxVec3& point )
70 actor->getGlobalPose().M.getInverse(mat);
71 return mat * (point - actor->getGlobalPosition());