vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
APDYNAMICART::PhysXManager Class Reference

#include <PhysXManager.h>

Public Member Functions

void releasePhysics ()
 
bool init ()
 
bool createScene ()
 
void getPhysicsResult ()
 
void startPhysics ()
 
NxActor * addHoopActorToScene (Hoop *hoop, NxVec3 linearVelocity=NxVec3(0.2, 0.0,-1.0))
 
void setStringJoints (HoopPtr first, HoopPtr second, Vec3ArrayPtr points)
 
void setActorPosition (HoopPtr hoop)
 
void setActorOrientation (HoopPtr hoop)
 
void addForceToHoop (HoopPtr hoop, const osg::Vec3 &direction)
 
void resetScene ()
 
void releaseHoopActor (HoopPtr hoop)
 
void releaseHoopJoints ()
 
void createRope (HoopPtr hoop, const osg::Vec3 &pos, double segHeight, double radius, unsigned int segments)
 
const std::vector< NxActor * > & getRopeActors () const
 
SimulationParametersgetSimualtionParameters ()
 
bool isRunning () const
 
void setSimulationRun (bool val)
 

Static Public Member Functions

static PhysXManagerget ()
 
static NxQuat toNxQuat (const osg::Quat &qRot)
 
static NxVec3 toNxVec3 (const osg::Vec3 &point)
 
static osg::Vec3 toOsgVec3 (const NxVec3 &point)
 
static osg::Quat toOsgQuat (const NxQuat &qRot)
 
static osg::Matrix getDAMatrix ()
 

Protected Member Functions

 PhysXManager ()
 
NxVec3 transformToLocalCoord (Hoop *hoop, const osg::Vec3 &point)
 
NxSphericalJoint * createRopeSphericalJoint (NxActor *a0, NxActor *a1, const NxVec3 &globalAnchor, const NxVec3 &globalAxis)
 
NxActor * createCapsule (const NxVec3 &pos, const NxReal height, const NxReal radius)
 

Protected Attributes

NxPhysicsSDK * _physicsSDK
 
NxScene * _scene
 
float _deltaTime
 
bool _simulationRunning
 
NxVec3 _linearVelocity
 
SimulationParameters _parameters
 
std::vector< NxJoint * > _joints
 
std::vector< NxActor * > _ropeSegs
 
std::vector< NxSphericalJoint * > _ropeLinks
 

Constructor & Destructor Documentation

APDYNAMICART::PhysXManager::PhysXManager ( )
protected

Member Function Documentation

void APDYNAMICART::PhysXManager::addForceToHoop ( HoopPtr  hoop,
const osg::Vec3 &  direction 
)
NxActor * APDYNAMICART::PhysXManager::addHoopActorToScene ( Hoop hoop,
NxVec3  linearVelocity = NxVec3(0.2,0.0,-1.0) 
)
NxActor * APDYNAMICART::PhysXManager::createCapsule ( const NxVec3 &  pos,
const NxReal  height,
const NxReal  radius 
)
protected
void APDYNAMICART::PhysXManager::createRope ( HoopPtr  hoop,
const osg::Vec3 &  pos,
double  segHeight,
double  radius,
unsigned int  segments 
)
NxSphericalJoint * APDYNAMICART::PhysXManager::createRopeSphericalJoint ( NxActor *  a0,
NxActor *  a1,
const NxVec3 &  globalAnchor,
const NxVec3 &  globalAxis 
)
protected
bool APDYNAMICART::PhysXManager::createScene ( )
static PhysXManager* APDYNAMICART::PhysXManager::get ( )
inlinestatic
osg::Matrix APDYNAMICART::PhysXManager::getDAMatrix ( )
inlinestatic
void APDYNAMICART::PhysXManager::getPhysicsResult ( )
const std::vector< NxActor * > & APDYNAMICART::PhysXManager::getRopeActors ( ) const
SimulationParameters& APDYNAMICART::PhysXManager::getSimualtionParameters ( )
inline
bool APDYNAMICART::PhysXManager::init ( void  )
bool APDYNAMICART::PhysXManager::isRunning ( ) const
inline
void APDYNAMICART::PhysXManager::releaseHoopActor ( HoopPtr  hoop)
void APDYNAMICART::PhysXManager::releaseHoopJoints ( )
void APDYNAMICART::PhysXManager::releasePhysics ( )
void APDYNAMICART::PhysXManager::resetScene ( )
void APDYNAMICART::PhysXManager::setActorOrientation ( HoopPtr  hoop)
void APDYNAMICART::PhysXManager::setActorPosition ( HoopPtr  hoop)
void APDYNAMICART::PhysXManager::setSimulationRun ( bool  val)
inline
void APDYNAMICART::PhysXManager::setStringJoints ( HoopPtr  first,
HoopPtr  second,
Vec3ArrayPtr  points 
)
void APDYNAMICART::PhysXManager::startPhysics ( )
NxQuat APDYNAMICART::PhysXManager::toNxQuat ( const osg::Quat &  qRot)
inlinestatic

Helper methods

NxVec3 APDYNAMICART::PhysXManager::toNxVec3 ( const osg::Vec3 &  point)
inlinestatic
osg::Quat APDYNAMICART::PhysXManager::toOsgQuat ( const NxQuat &  qRot)
inlinestatic
osg::Vec3 APDYNAMICART::PhysXManager::toOsgVec3 ( const NxVec3 &  point)
inlinestatic
NxVec3 APDYNAMICART::PhysXManager::transformToLocalCoord ( Hoop hoop,
const osg::Vec3 &  point 
)
inlineprotected

Member Data Documentation

float APDYNAMICART::PhysXManager::_deltaTime
protected
std::vector<NxJoint*> APDYNAMICART::PhysXManager::_joints
protected
NxVec3 APDYNAMICART::PhysXManager::_linearVelocity
protected
SimulationParameters APDYNAMICART::PhysXManager::_parameters
protected
NxPhysicsSDK* APDYNAMICART::PhysXManager::_physicsSDK
protected
std::vector<NxSphericalJoint*> APDYNAMICART::PhysXManager::_ropeLinks
protected
std::vector<NxActor*> APDYNAMICART::PhysXManager::_ropeSegs
protected
NxScene* APDYNAMICART::PhysXManager::_scene
protected
bool APDYNAMICART::PhysXManager::_simulationRunning
protected

The documentation for this class was generated from the following files: