00001 /* 00002 Copyright (C) 2005-2006 Feeling Software Inc. 00003 MIT License: http://www.opensource.org/licenses/mit-license.php 00004 */ 00005 /* 00006 Based on the FS Import classes: 00007 Copyright (C) 2005-2006 Feeling Software Inc 00008 Copyright (C) 2005-2006 Autodesk Media Entertainment 00009 MIT License: http://www.opensource.org/licenses/mit-license.php 00010 */ 00011 00017 #ifndef _FCD_CONTROLLER_H_ 00018 #define _FCD_CONTROLLER_H_ 00019 00020 #include "FCDocument/FCDEntity.h" 00021 00022 class FCDocument; 00023 class FCDSkinController; 00024 class FCDMorphController; 00025 00034 class FCOLLADA_EXPORT FCDController : public FCDEntity 00035 { 00036 private: 00037 DeclareObjectType; 00038 00039 FCDSkinController* skinController; 00040 FCDMorphController* morphController; 00041 00042 string targetId; // COLLADA 1.3 backward compatibility 00043 00044 public: 00048 FCDController(FCDocument* document); 00049 00052 virtual ~FCDController(); 00053 00057 virtual Type GetType() const { return CONTROLLER; }; 00058 00061 bool HasSkinController() const { return skinController != NULL; } 00062 00065 bool HasMorphController() const { return morphController != NULL; } 00066 00070 FCDSkinController* CreateSkinController(); 00071 00075 FCDMorphController* CreateMorphController(); 00076 00082 FCDSkinController* GetSkinController() { return skinController; } 00083 const FCDSkinController* GetSkinController() const { return skinController; } 00090 FCDMorphController* GetMorphController() { return morphController; } 00091 const FCDMorphController* GetMorphController() const { return morphController; } 00099 FCDEntity* GetBaseTarget(); 00100 const FCDEntity* GetBaseTarget() const; 00108 FCDGeometry* GetBaseGeometry(); 00109 const FCDGeometry* GetBaseGeometry() const; 00115 const string& GetTargetId() const { return targetId; } 00116 00121 virtual FUStatus LoadFromXML(xmlNode* controllerNode); 00122 00126 virtual xmlNode* WriteToXML(xmlNode* parentNode) const; 00127 00132 FUStatus Link(); 00133 }; 00134 00135 #endif // _FCD_CONTROLLER_H_ 00136