CNiJoints Class Reference

#include <NiJointsTool.h>

List of all members.

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]

Detailed Description

Definition at line 234 of file NiJointsTool.h.


Constructor & Destructor Documentation

CNiJoints ( void   )  [inline]

Definition at line 237 of file NiJointsTool.h.

References CNiJoints::init().

00237 { init();}

Here is the call graph for this function:

CNiJoints ( NiSDK_Lib  lib  )  [inline]

Definition at line 238 of file NiJointsTool.h.

References CNiJoints::init(), and CNiJoints::sdk_lib.

00238 { init(); sdk_lib = lib;}

Here is the call graph for this function:

virtual ~CNiJoints ( void   )  [inline, virtual]

Definition at line 239 of file NiJointsTool.h.

00239 {}


Member Function Documentation

void clear ( void   )  [inline]

Definition at line 241 of file NiJointsTool.h.

References CNiJoints::init().

00241 { init();}

Here is the call graph for this function:

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 }

Here is the caller graph for this function:

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.

00657 {
00658     posVect = vct;
00659     rotQuat = qut;
00660     jntAngl = agl;
00661     crdVect = crd;
00662     posRing = vrg;
00663     rotRing = qrg;
00664 }

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 }

Here is the call graph for this function:

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 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Vector<int>* crdVect

Definition at line 257 of file NiJointsTool.h.

Referenced by CNiJoints::connectJointsData().

double* jntAngl
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
Quaternion<double>* rotQuat
CRingBuffer* rotRing

Definition at line 262 of file NiJointsTool.h.

Referenced by CNiJoints::connectJointsData(), and CNiJoints::init().


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

Generated on 15 Nov 2023 for JunkBox_Win_Lib by  doxygen 1.6.1