| 
    JunkBox_Lib++ (for Windows) 1.10.1
    
   | 
 
#include <BVHTool.h>


Public Member Functions | |
| CBVHTool (void) | |
| virtual | ~CBVHTool (void) | 
| void | init (void) | 
| void | free_data (void) | 
| void | clear_data (void) | 
| void | copy_bvh_data (BVHData *bvh) | 
| BVHData | setback_bvh_data (void) | 
| BOOL | readFile (char *fname) | 
| BOOL | writeFile (char *fname) | 
| BOOL | writeMultiFile (char *fname, int sec, int space) | 
| BOOL | readBVH (FILE *fp) | 
| BOOL | printBVH (FILE *fp) | 
| void | setHierarchy (tTree *hrchy) | 
| Vector< double > * | getPosOffset (void) | 
| Vector< double > * | getPosData (int frame) | 
| Quaternion< double > * | getQuaternion (int frame) | 
Public Attributes | |
| Buffer * | joint_name | 
| int * | channel_num | 
| int * | channel_idx | 
| Buffer | flex_joint | 
Private Member Functions | |
| void | set_offset (void) | 
| void | _set_offset (tTree *tree, int *jnum) | 
| void | get_bvh_params (void) | 
| void | _get_bvh_params (tTree *tree, int **ch, Buffer **jn) | 
      
  | 
  inline | 
Definition at line 23 of file BVHTool.h.
References CBVHTool::init().

      
  | 
  virtual | 
Definition at line 15 of file BVHTool.cpp.
References DEBUG_INFO, and CBVHTool::free_data().

Definition at line 383 of file BVHTool.cpp.
References CBVHTool::_get_bvh_params(), cat_Buffer(), dup_Buffer(), and CBVHTool::flex_joint.
Referenced by CBVHTool::_get_bvh_params(), and CBVHTool::get_bvh_params().


      
  | 
  private | 
Definition at line 308 of file BVHTool.cpp.
References CBVHTool::_set_offset().
Referenced by CBVHTool::_set_offset(), and CBVHTool::set_offset().


| void clear_data | ( | void | ) | 
Definition at line 71 of file BVHTool.cpp.
References CBVHTool::channel_idx, CBVHTool::channel_num, CBVHTool::flex_joint, free_Buffer(), and CBVHTool::joint_name.
Referenced by CBVHTool::free_data().


| void copy_bvh_data | ( | BVHData * | bvh | ) | 
Definition at line 95 of file BVHTool.cpp.
Referenced by CBVHTool::readBVH().

| void free_data | ( | void | ) | 
Definition at line 45 of file BVHTool.cpp.
References CBVHTool::clear_data(), and del_tTree().
Referenced by CBVHTool::setHierarchy(), and CBVHTool::~CBVHTool().


      
  | 
  private | 
既存の hierarchyデータから以下のデータを得る. channel_num, channel_idx, flex_joint, joint_name
Definition at line 346 of file BVHTool.cpp.
References CBVHTool::_get_bvh_params(), CBVHTool::channel_idx, CBVHTool::channel_num, CBVHTool::flex_joint, CBVHTool::joint_name, and make_Buffer().
Referenced by CBVHTool::readBVH(), and CBVHTool::setHierarchy().


| Vector< double > * getPosData | ( | int | frame | ) | 
Definition at line 417 of file BVHTool.cpp.
References Buffer::buf, CBVHTool::channel_idx, CBVHTool::channel_num, FALSE, CBVHTool::flex_joint, Vector< T >::set(), TRUE, Vector< T >::x, Vector< T >::y, and Vector< T >::z.

| Vector< double > * getPosOffset | ( | void | ) | 
Definition at line 530 of file BVHTool.cpp.
References vector::n, Vector< T >::n, vector::x, Vector< T >::x, vector::y, Vector< T >::y, vector::z, and Vector< T >::z.
| Quaternion< double > * getQuaternion | ( | int | frame | ) | 
Definition at line 461 of file BVHTool.cpp.
References Buffer::buf, CBVHTool::channel_idx, CBVHTool::channel_num, FALSE, CBVHTool::flex_joint, PI, Quaternion< T >::set(), Quaternion< T >::setRotation(), and TRUE.

| void init | ( | void | ) | 
Definition at line 23 of file BVHTool.cpp.
References CBVHTool::channel_idx, CBVHTool::channel_num, CBVHTool::flex_joint, init_Buffer(), and CBVHTool::joint_name.
Referenced by CBVHTool::CBVHTool().


| BOOL printBVH | ( | FILE * | fp | ) | 
Definition at line 273 of file BVHTool.cpp.
References BVH_ERR_INVLD_ARGS, bvh_print_data(), FALSE, CBVHTool::setback_bvh_data(), and TRUE.

| BOOL readBVH | ( | FILE * | fp | ) | 
Definition at line 155 of file BVHTool.cpp.
References BVH_ERR_FAIL_OP, BVH_ERR_INVLD_ARGS, bvh_read_data, CBVHTool::copy_bvh_data(), del_BVHData(), FALSE, CBVHTool::get_bvh_params(), and TRUE.
Referenced by CBVHTool::readFile().


| BOOL readFile | ( | char * | fname | ) | 
Definition at line 137 of file BVHTool.cpp.
References BVH_ERR_FAIL_FOPEN, BVH_ERR_INVLD_ARGS, FALSE, file_size(), and CBVHTool::readBVH().

      
  | 
  private | 
Definition at line 299 of file BVHTool.cpp.
References CBVHTool::_set_offset().
Referenced by CBVHTool::setback_bvh_data().


| BVHData setback_bvh_data | ( | void | ) | 
Definition at line 112 of file BVHTool.cpp.
References CBVHTool::set_offset().
Referenced by CBVHTool::printBVH(), CBVHTool::writeFile(), and CBVHTool::writeMultiFile().


| void setHierarchy | ( | tTree * | hrchy | ) | 
Definition at line 287 of file BVHTool.cpp.
References bvh_count_channels(), bvh_count_joints(), CBVHTool::free_data(), and CBVHTool::get_bvh_params().

| BOOL writeFile | ( | char * | fname | ) | 
Definition at line 175 of file BVHTool.cpp.
References BVH_ERR_INVLD_ARGS, bvh_write_file(), FALSE, CBVHTool::setback_bvh_data(), and TRUE.

| BOOL writeMultiFile | ( | char * | fname, | 
| int | sec, | ||
| int | space ) | 
BOOL CBVHTool::writeMultiFile(char* fname, int sec, int space)
sec秒区切りで.BVHファイルを出力する.のりしろ(フレーム数)付き.
| fname | 出力ファイル名のベース.fname_00 〜 fname_99 のファイルが出力される. | 
| sec | 1ファイルの最大再生時間(秒). | 
| space | のりしろのフレーム数. | 
| TRUE | 成功 | 
| FALSE | 失敗 | 
Definition at line 200 of file BVHTool.cpp.
References Buffer::buf, BVH_ERR_INVLD_ARGS, bvh_write_file(), cat_s2Buffer, CBVHTool::channel_num, dup_str(), FALSE, free_Buffer(), get_file_extension(), make_Buffer_bystr, numbering_name(), CBVHTool::setback_bvh_data(), and TRUE.

| int* channel_idx | 
Definition at line 71 of file BVHTool.h.
Referenced by CBVHTool::clear_data(), CBVHTool::get_bvh_params(), CBVHTool::getPosData(), CBVHTool::getQuaternion(), and CBVHTool::init().
| int* channel_num | 
Definition at line 70 of file BVHTool.h.
Referenced by CBVHTool::clear_data(), CBVHTool::get_bvh_params(), CBVHTool::getPosData(), CBVHTool::getQuaternion(), CBVHTool::init(), and CBVHTool::writeMultiFile().
| Buffer flex_joint | 
Definition at line 72 of file BVHTool.h.
Referenced by CBVHTool::_get_bvh_params(), CBVHTool::clear_data(), CBVHTool::get_bvh_params(), CBVHTool::getPosData(), CBVHTool::getQuaternion(), and CBVHTool::init().
| Buffer* joint_name | 
Definition at line 69 of file BVHTool.h.
Referenced by CBVHTool::clear_data(), CBVHTool::get_bvh_params(), and CBVHTool::init().