A Node that renders a hand model in the OSG scene and maintains a Bullet rigid body and collision shape representation of the hand. More...
#include <osgbInteraction/HandNode.h>
Classes | |
| struct | AllParams |
| struct | ArticulationInfo |
Public Types | |
| enum | Handedness { RIGHT, LEFT } |
| enum | { FINGER_0_TRANSLATE = 0, FINGER_1_TRANSLATE, FINGER_2_TRANSLATE, FINGER_3_TRANSLATE, FINGER_4_TRANSLATE, FINGER_0_ROTATE_INNER, FINGER_1_ROTATE_INNER, FINGER_2_ROTATE_INNER, FINGER_3_ROTATE_INNER, FINGER_4_ROTATE_INNER, FINGER_0_ROTATE_MIDDLE, FINGER_1_ROTATE_MIDDLE, FINGER_2_ROTATE_MIDDLE, FINGER_3_ROTATE_MIDDLE, FINGER_4_ROTATE_MIDDLE, FINGER_0_ROTATE_OUTER, FINGER_1_ROTATE_OUTER, FINGER_2_ROTATE_OUTER, FINGER_3_ROTATE_OUTER, FINGER_4_ROTATE_OUTER, LAST_ACTUAL_ARTICULATION, FINGER_1_MIDDLE_OUTER, FINGER_2_MIDDLE_OUTER, FINGER_3_MIDDLE_OUTER, FINGER_4_MIDDLE_OUTER, SPREAD_0_1, SPREAD_1_2, SPREAD_2_3, SPREAD_3_4, MAX_ARTICULATIONS } |
| enum | { POSE_DEFAULT = 0, POSE_HOOK, POSE_POINT, POSE_FIST } |
| typedef int | Articulation |
| typedef int | Pose |
|
typedef std::vector < ArticulationInfo > | ArticulationInfoList |
Public Member Functions | |
| HandNode (btDynamicsWorld *bulletWorld, const HandNode::Handedness rightOrLeft=HandNode::RIGHT, float handLength=HandNode::_defaultLength) | |
| HandNode (const HandNode &rhs, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
| META_Node (osgbInteraction, HandNode) | |
| virtual void | traverse (osg::NodeVisitor &nv) |
| virtual osg::BoundingSphere | computeBound () const |
| virtual bool | computeLocalToWorldMatrix (osg::Matrix &matrix, osg::NodeVisitor *nv) const |
| virtual bool | computeWorldToLocalMatrix (osg::Matrix &matrix, osg::NodeVisitor *nv) const |
| void | setAll (const AllParams ¶ms) |
| void | getAll (AllParams ¶ms) const |
| void | setPosition (const osg::Vec3 &pos) |
| const osg::Vec3 & | getPosition () const |
| void | setAttitude (const osg::Quat &quat) |
| const osg::Quat & | getAttitude () const |
| void | setTraverseHand (const bool traverse) |
| bool | getTraverseHand () const |
| void | setHandedness (const HandNode::Handedness rightOrLeft) |
| HandNode::Handedness | getHandedness () const |
| void | setHandLength (float length) |
| float | getHandLength () const |
| void | setArticulation (const HandNode::Articulation part, const float radians) |
| float | getArticulation (const HandNode::Articulation part) const |
| void | setCalibrateMode (const bool calibrate) |
| bool | getCalibrateMode () const |
| void | setGestureHandlerVector (osgbInteraction::GestureHandlerVector ghv) |
| osgbInteraction::GestureHandlerVector & | getGestureHandlerVector () |
| void | sendGestureCode (const unsigned int gestureCode) |
| btRigidBody * | findClosest () const |
| bool | good () const |
| void | registerMultiThreaded (osgbDynamics::PhysicsThread *pt) |
| btDynamicsWorld * | getDynamicsWorld () |
| btRigidBody * | getRigidBody () |
| btPairCachingGhostObject * | getGhostObject () |
| void | setUseGhost (bool useGhost) |
| bool | getUseGhost () const |
| void | setDebug (bool debug) |
| void | setPose (Pose pose, float radiansPerSec=(float)(osg::PI)) |
| void | dump () const |
Protected Member Functions | |
| void | init () |
| void | cleanup () |
| void | adjustPosition () |
| void | updateTransformAndAdjustPosition (const osg::Vec3 &deltaMotion=osg::Vec3(0., 0., 0.)) |
| bool | recoverFromPenetration () |
| bool | adjustPositionInternal (const osg::Vec3 &deltaMotion=osg::Vec3(0., 0., 0.)) |
| void | updateTransformInternal (const osg::Vec3 &deltaMotion=osg::Vec3(0., 0., 0.)) |
| void | setArticulationInternal (const HandNode::Articulation part, const float radians) |
| void | setVirtualArticulation (const HandNode::Articulation part, const float radians) |
| float | getVirtualArticulation (const HandNode::Articulation part) const |
Protected Attributes | |
| osg::ref_ptr< osg::Node > | _hand |
| ArticulationInfoList | _ail |
| ArticulationInfo | _palm |
| bool | _calibrate |
| osg::Vec3 | _requestedPosition |
| osg::Vec3 | _correctedPosition |
| Handedness | _rightOrLeft |
| osg::Quat | _attitude |
| float | _length |
| btDynamicsWorld * | _bulletWorld |
| btRigidBody * | _body |
| btCompoundShape * | _shape |
| bool | _useGhost |
| btPairCachingGhostObject * | _ghost |
| btManifoldArray | _manifoldArray |
| osgbInteraction::GestureHandlerVector | _ghv |
| bool | _traverseHand |
| osgbDynamics::PhysicsThread * | _pt |
| bool | _debug |
| osg::ref_ptr< osg::Vec3Array > | _debugVerts |
Static Protected Attributes | |
| static float | _defaultLength |
A Node that renders a hand model in the OSG scene and maintains a Bullet rigid body and collision shape representation of the hand.
This version of HandNode has a calibration feature. call setCalibrateMode( true ), then move your physical hand to match the position of the virtual hand. The virtual hand will not move while in calibrate mode. After your physical hand matches the cirtual hand, call setCalibrateMode( false ).
float osgbInteraction::HandNode::_defaultLength [static, protected] |
1.7.2