#include <NiJointsTool.h>
Public Member Functions | |
CNiJoints (void) | |
CNiJoints (NiSDK_Lib lib) | |
virtual | ~CNiJoints (void) |
void | clear (void) |
void | init (void) |
void | clearNiJointsData (void) |
void | connectJointsData (Vector< double > *vct, Quaternion< double > *qut, Vector< int > *crd, double *agl, CRingBuffer *vrg, CRingBuffer *qrg) |
void | copyJoints2NiJoints (BOOL mirror) |
Public Attributes | |
NiSDK_Lib | sdk_lib |
Vector< double > * | posVect |
Quaternion< double > * | rotQuat |
Vector< int > * | crdVect |
double * | jntAngl |
CRingBuffer * | posRing |
CRingBuffer * | rotRing |
Vector< double > | niPosVect [NI_TOTAL_JOINT_NUM] |
Quaternion< double > | niRotQuat [NI_TOTAL_JOINT_NUM] |
double | niJntAngl [NI_TOTAL_JOINT_NUM] |
Definition at line 234 of file NiJointsTool.h.
CNiJoints | ( | void | ) | [inline] |
Definition at line 237 of file NiJointsTool.h.
References CNiJoints::init().
00237 { init();}
Definition at line 238 of file NiJointsTool.h.
References CNiJoints::init(), and CNiJoints::sdk_lib.
virtual ~CNiJoints | ( | void | ) | [inline, virtual] |
Definition at line 239 of file NiJointsTool.h.
void clear | ( | void | ) | [inline] |
Definition at line 241 of file NiJointsTool.h.
References CNiJoints::init().
00241 { init();}
void clearNiJointsData | ( | void | ) |
Definition at line 640 of file NiJointsTool.cpp.
References NI_TOTAL_JOINT_NUM, CNiJoints::niJntAngl, CNiJoints::niPosVect, and CNiJoints::niRotQuat.
Referenced by CNiJoints::init().
00641 { 00642 // 00643 for (int j=0; j<NI_TOTAL_JOINT_NUM; j++) { 00644 // 00645 niPosVect[j].init(-1.0); 00646 niRotQuat[j].init(-1.0); 00647 niJntAngl[j] = 0.0; 00648 } 00649 00650 return; 00651 }
void connectJointsData | ( | Vector< double > * | vct, | |
Quaternion< double > * | qut, | |||
Vector< int > * | crd, | |||
double * | agl, | |||
CRingBuffer * | vrg, | |||
CRingBuffer * | qrg | |||
) |
Definition at line 655 of file NiJointsTool.cpp.
References CNiJoints::crdVect, CNiJoints::jntAngl, CNiJoints::posRing, CNiJoints::posVect, CNiJoints::rotQuat, and CNiJoints::rotRing.
void copyJoints2NiJoints | ( | BOOL | mirror | ) |
Definition at line 668 of file NiJointsTool.cpp.
References CNiJoints::jntAngl, jbxwl::Ni2SDKPosJointNum(), jbxwl::Ni2SDKRotJointNum(), NI_TOTAL_JOINT_NUM, CNiJoints::niJntAngl, CNiJoints::niPosVect, CNiJoints::niRotQuat, CNiJoints::posVect, CNiJoints::rotQuat, and CNiJoints::sdk_lib.
00669 { 00670 if (posVect!=NULL) { 00671 for (int j=0; j<NI_TOTAL_JOINT_NUM; j++) { 00672 int n = Ni2SDKPosJointNum(j, sdk_lib); 00673 if (n>=0) { 00674 niPosVect[j] = posVect[n]; 00675 } 00676 } 00677 } 00678 00679 if (rotQuat!=NULL) { 00680 for (int j=0; j<NI_TOTAL_JOINT_NUM; j++) { 00681 int n = Ni2SDKRotJointNum(j, sdk_lib); 00682 if (n>=0) { 00683 niRotQuat[j] = rotQuat[n]; 00684 } 00685 } 00686 } 00687 00688 if (jntAngl!=NULL) { 00689 for (int j=0; j<NI_TOTAL_JOINT_NUM; j++) { 00690 int n = Ni2SDKRotJointNum(j, sdk_lib); 00691 if (n>=0) { 00692 //if (mirror) n = NiSDKMirrorJointNum(n, sdk_lib); 00693 niJntAngl[j] = jntAngl[n]; 00694 } 00695 } 00696 } 00697 00698 return; 00699 }
void init | ( | void | ) |
Definition at line 624 of file NiJointsTool.cpp.
References CNiJoints::clearNiJointsData(), CNiJoints::jntAngl, jbxwl::NiSDK_None, CNiJoints::posRing, CNiJoints::posVect, CNiJoints::rotQuat, CNiJoints::rotRing, and CNiJoints::sdk_lib.
Referenced by CNiJoints::clear(), and CNiJoints::CNiJoints().
00625 { 00626 sdk_lib = NiSDK_None; 00627 00628 posVect = NULL; 00629 rotQuat = NULL; 00630 jntAngl = NULL; 00631 00632 posRing = NULL; 00633 rotRing = NULL; 00634 00635 clearNiJointsData(); 00636 }
Vector<int>* crdVect |
Definition at line 257 of file NiJointsTool.h.
Referenced by CNiJoints::connectJointsData().
double* jntAngl |
Definition at line 259 of file NiJointsTool.h.
Referenced by CNiJoints::connectJointsData(), CNiJoints::copyJoints2NiJoints(), and CNiJoints::init().
double niJntAngl[NI_TOTAL_JOINT_NUM] |
Definition at line 266 of file NiJointsTool.h.
Referenced by CNiJoints::clearNiJointsData(), and CNiJoints::copyJoints2NiJoints().
Vector<double> niPosVect[NI_TOTAL_JOINT_NUM] |
Definition at line 264 of file NiJointsTool.h.
Referenced by CNiJoints::clearNiJointsData(), and CNiJoints::copyJoints2NiJoints().
Quaternion<double> niRotQuat[NI_TOTAL_JOINT_NUM] |
Definition at line 265 of file NiJointsTool.h.
Referenced by CNiJoints::clearNiJointsData(), and CNiJoints::copyJoints2NiJoints().
CRingBuffer* posRing |
Definition at line 261 of file NiJointsTool.h.
Referenced by CNiJoints::connectJointsData(), and CNiJoints::init().
Vector<double>* posVect |
Definition at line 255 of file NiJointsTool.h.
Referenced by CNiJoints::connectJointsData(), CNiJoints::copyJoints2NiJoints(), and CNiJoints::init().
Quaternion<double>* rotQuat |
Definition at line 256 of file NiJointsTool.h.
Referenced by CNiJoints::connectJointsData(), CNiJoints::copyJoints2NiJoints(), and CNiJoints::init().
CRingBuffer* rotRing |
Definition at line 262 of file NiJointsTool.h.
Referenced by CNiJoints::connectJointsData(), and CNiJoints::init().
Definition at line 244 of file NiJointsTool.h.
Referenced by CNiJoints::CNiJoints(), CNiJoints::copyJoints2NiJoints(), and CNiJoints::init().