Panda3D
|
00001 // Filename: daeCharacter.h 00002 // Created by: pro-rsoft (24Nov08) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "pandatoolbase.h" 00016 #include "typedReferenceCount.h" 00017 #include "typeHandle.h" 00018 #include "eggTable.h" 00019 #include "daeToEggConverter.h" 00020 00021 #include "pre_fcollada_include.h" 00022 #include "FCollada.h" 00023 #include "FCDocument/FCDSceneNode.h" 00024 #include "FCDocument/FCDControllerInstance.h" 00025 #include "FCDocument/FCDSkinController.h" 00026 00027 #ifndef DAECHARACTER_H 00028 #define DAECHARACTER_H 00029 00030 //////////////////////////////////////////////////////////////////// 00031 // Class : DaeCharacter 00032 // Description : Class representing an animated character. 00033 //////////////////////////////////////////////////////////////////// 00034 class DaeCharacter : public TypedReferenceCount { 00035 public: 00036 DaeCharacter(const string name, const FCDControllerInstance* controller_instance); 00037 PT(EggTable) as_egg_bundle(); 00038 void process_joint(PT(EggTable) parent, FCDSceneNode* node); 00039 00040 private: 00041 int _frame_rate; 00042 string _name; 00043 FCDControllerInstance* _controller_instance; 00044 FCDSkinController* _skin_controller; 00045 pmap<string, FCDSkinControllerJoint*> _controller_joints; 00046 00047 public: 00048 virtual TypeHandle get_type() const { 00049 return get_class_type(); 00050 } 00051 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00052 static TypeHandle get_class_type() { 00053 return _type_handle; 00054 } 00055 static void init_type() { 00056 TypedReferenceCount::init_type(); 00057 register_type(_type_handle, "DaeCharacter", 00058 TypedReferenceCount::get_class_type()); 00059 } 00060 00061 private: 00062 static TypeHandle _type_handle; 00063 }; 00064 00065 #endif