CBaseFrameTool Class Reference

#include <NiJointsTool.h>

Inheritance diagram for CBaseFrameTool:
Inheritance graph
[legend]
Collaboration diagram for CBaseFrameTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CBaseFrameTool (void)
virtual ~CBaseFrameTool (void)
virtual unsigned int getFramesNumber (void)
virtual int getJointsNumber (void)
virtual NiFrameDatagetFramesData (void)
virtual NiJointDatagetJointsData (int frmnum, int fps)
virtual int getPlayBackTime (void)
virtual int getPlayBackFPS (void)
virtual BOOL readFile (FILE *fp)
virtual BOOL writeFile (FILE *fp)

Protected Member Functions

void init_data (void)
void free_data (void)
void clear_data (void)
void clearJointsData (int jnum)
void clearVectorData (int jnum)

Protected Attributes

unsigned int frames_num
int joints_num
int start_time
int stop_time
int exec_time
NiFrameDataframesData
NiJointDatajointsData
Vector< double > * posVect
Quaternion< double > * rotQuat

Detailed Description

Definition at line 279 of file NiJointsTool.h.


Constructor & Destructor Documentation

CBaseFrameTool ( void   ) 

Definition at line 1078 of file NiJointsTool.cpp.

References CBaseFrameTool::init_data().

01079 { 
01080     init_data();
01081 }

Here is the call graph for this function:

~CBaseFrameTool ( void   )  [virtual]

Definition at line 1085 of file NiJointsTool.cpp.

References CBaseFrameTool::free_data().

01086 {
01087     DEBUG_INFO("DESTRUCTOR: CBaseFrameTool\n");
01088 
01089     free_data();
01090 }

Here is the call graph for this function:


Member Function Documentation

void clear_data ( void   )  [protected]

Reimplemented in CNiBVHTool, CNiJTextTool, and CNiVMDTool.

Definition at line 1113 of file NiJointsTool.cpp.

References CBaseFrameTool::exec_time, CBaseFrameTool::frames_num, CBaseFrameTool::joints_num, CBaseFrameTool::start_time, and CBaseFrameTool::stop_time.

Referenced by CBaseFrameTool::free_data(), and CBaseFrameTool::init_data().

01114 {
01115     frames_num = 0;
01116     joints_num = 0;
01117 
01118     start_time = 0;
01119     stop_time  = 0;
01120     exec_time  = 0;
01121 }

Here is the caller graph for this function:

void clearJointsData ( int  jnum  )  [protected]

Definition at line 1140 of file NiJointsTool.cpp.

References NiJointData::index, NiJointData::joint, CBaseFrameTool::jointsData, NiJointData::quat, and NiJointData::vect.

Referenced by CNiVMDTool::getJointsData(), CNiJTextTool::getJointsData(), CNiBVHTool::getJointsData(), CNiVMDTool::readFile(), CNiJTextTool::readFile(), and CNiBVHTool::readFile().

01141 {
01142     if (jointsData!=NULL) {
01143         for (int j=0; j<jnum; j++) {
01144             jointsData[j].index = -1;
01145             jointsData[j].joint = -1;
01146             jointsData[j].vect.init(-1.0);
01147             jointsData[j].quat.init(-1.0);
01148         }
01149     }
01150 }

Here is the caller graph for this function:

void clearVectorData ( int  jnum  )  [protected]

Definition at line 1154 of file NiJointsTool.cpp.

References CBaseFrameTool::posVect, and CBaseFrameTool::rotQuat.

Referenced by CNiVMDTool::calcJointRotation(), CNiVMDTool::readFile(), and CNiJTextTool::readFile().

01155 {
01156     if (posVect!=NULL && rotQuat!=NULL) {
01157         for (int j=0; j<jnum; j++) {
01158             posVect[j].init(-1.0);
01159             rotQuat[j].init(-1.0);
01160         }
01161     }
01162 }

Here is the caller graph for this function:

void free_data ( void   )  [protected]

Reimplemented in CNiBVHTool, CNiJTextTool, and CNiVMDTool.

Definition at line 1094 of file NiJointsTool.cpp.

References CBaseFrameTool::clear_data(), CBaseFrameTool::frames_num, CBaseFrameTool::framesData, jbxwl::freeFramesData(), CBaseFrameTool::jointsData, CBaseFrameTool::posVect, and CBaseFrameTool::rotQuat.

Referenced by CBaseFrameTool::~CBaseFrameTool().

01095 {
01096     if (framesData!=NULL) freeFramesData(framesData, frames_num);
01097     if (jointsData!=NULL) ::free(jointsData);
01098 
01099     if (posVect!=NULL) ::free(posVect);
01100     if (rotQuat!=NULL) ::free(rotQuat);
01101 
01102     framesData = NULL; 
01103     jointsData = NULL;
01104 
01105     posVect    = NULL;
01106     rotQuat    = NULL;
01107     
01108     clear_data();
01109 }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual NiFrameData* getFramesData ( void   )  [inline, virtual]

Reimplemented in CNiVMDTool.

Definition at line 289 of file NiJointsTool.h.

References CBaseFrameTool::framesData.

Referenced by CNiFileTool::readBVHFile(), and CNiFileTool::readJTextFile().

00289 { return framesData;}

Here is the caller graph for this function:

virtual unsigned int getFramesNumber ( void   )  [inline, virtual]

Reimplemented in CNiVMDTool.

Definition at line 286 of file NiJointsTool.h.

References CBaseFrameTool::frames_num.

Referenced by CNiFileTool::readBVHFile(), CNiFileTool::readJTextFile(), and CNiFileTool::writeBVHFile().

00286 { return frames_num;}

Here is the caller graph for this function:

virtual NiJointData* getJointsData ( int  frmnum,
int  fps 
) [inline, virtual]

Reimplemented in CNiBVHTool, CNiJTextTool, and CNiVMDTool.

Definition at line 290 of file NiJointsTool.h.

References CBaseFrameTool::jointsData.

Referenced by CNiFileTool::getJointsDataSeq(), and CNiFileTool::writeBVHFile().

00290 { return jointsData;}

Here is the caller graph for this function:

virtual int getJointsNumber ( void   )  [inline, virtual]

Definition at line 287 of file NiJointsTool.h.

References CBaseFrameTool::joints_num.

Referenced by CNiFileTool::writeBVHFile().

00287 { return joints_num;}

Here is the caller graph for this function:

virtual int getPlayBackFPS ( void   )  [inline, virtual]

Reimplemented in CNiBVHTool.

Definition at line 293 of file NiJointsTool.h.

Referenced by CNiFileTool::readJTextFile(), and CNiFileTool::readVMDFile().

00293 { return 30;}

Here is the caller graph for this function:

virtual int getPlayBackTime ( void   )  [inline, virtual]

Definition at line 292 of file NiJointsTool.h.

References CBaseFrameTool::exec_time.

Referenced by CNiFileTool::writeBVHFile().

00292 { return exec_time;}

Here is the caller graph for this function:

void init_data ( void   )  [protected]

Definition at line 1125 of file NiJointsTool.cpp.

References CBaseFrameTool::clear_data(), CBaseFrameTool::framesData, CBaseFrameTool::jointsData, CBaseFrameTool::posVect, and CBaseFrameTool::rotQuat.

Referenced by CBaseFrameTool::CBaseFrameTool().

01126 {
01127     framesData = NULL; 
01128     jointsData = NULL;
01129 
01130     posVect    = NULL;
01131     rotQuat    = NULL;
01132 
01133     clear_data();
01134 }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual BOOL readFile ( FILE *  fp  )  [inline, virtual]

Reimplemented in CNiBVHTool, CNiJTextTool, and CNiVMDTool.

Definition at line 295 of file NiJointsTool.h.

00295 { return FALSE;}

virtual BOOL writeFile ( FILE *  fp  )  [inline, virtual]

Reimplemented in CNiBVHTool.

Definition at line 296 of file NiJointsTool.h.

00296 { return FALSE;}


Member Data Documentation

int exec_time [protected]
unsigned int frames_num [protected]
NiFrameData* framesData [protected]
int joints_num [protected]
NiJointData* jointsData [protected]
Vector<double>* posVect [protected]
Quaternion<double>* rotQuat [protected]
int start_time [protected]
int stop_time [protected]

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