00001 /* 00002 * Copyright 2006 Sony Computer Entertainment Inc. 00003 * 00004 * Licensed under the MIT Open Source License, for details please see license.txt or the website 00005 * http://www.opensource.org/licenses/mit-license.php 00006 * 00007 */ 00008 00009 #ifndef __domCOLLADA_h__ 00010 #define __domCOLLADA_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domAsset.h> 00017 #include <dom/domLibrary_animations.h> 00018 #include <dom/domLibrary_animation_clips.h> 00019 #include <dom/domLibrary_cameras.h> 00020 #include <dom/domLibrary_controllers.h> 00021 #include <dom/domLibrary_geometries.h> 00022 #include <dom/domLibrary_effects.h> 00023 #include <dom/domLibrary_force_fields.h> 00024 #include <dom/domLibrary_images.h> 00025 #include <dom/domLibrary_lights.h> 00026 #include <dom/domLibrary_materials.h> 00027 #include <dom/domLibrary_nodes.h> 00028 #include <dom/domLibrary_physics_materials.h> 00029 #include <dom/domLibrary_physics_models.h> 00030 #include <dom/domLibrary_physics_scenes.h> 00031 #include <dom/domLibrary_visual_scenes.h> 00032 #include <dom/domExtra.h> 00033 #include <dom/domInstanceWithExtra.h> 00034 class DAE; 00035 00040 class domCOLLADA : public daeElement 00041 { 00042 public: 00043 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::COLLADA; } 00044 static daeInt ID() { return 602; } 00045 virtual daeInt typeID() const { return ID(); } 00046 public: 00047 class domScene; 00048 00049 typedef daeSmartRef<domScene> domSceneRef; 00050 typedef daeTArray<domSceneRef> domScene_Array; 00051 00059 class domScene : public daeElement 00060 { 00061 public: 00062 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SCENE; } 00063 static daeInt ID() { return 603; } 00064 virtual daeInt typeID() const { return ID(); } 00065 00066 protected: // Elements 00072 domInstanceWithExtra_Array elemInstance_physics_scene_array; 00078 domInstanceWithExtraRef elemInstance_visual_scene; 00082 domExtra_Array elemExtra_array; 00083 00084 public: //Accessors and Mutators 00089 domInstanceWithExtra_Array &getInstance_physics_scene_array() { return elemInstance_physics_scene_array; } 00094 const domInstanceWithExtra_Array &getInstance_physics_scene_array() const { return elemInstance_physics_scene_array; } 00099 const domInstanceWithExtraRef getInstance_visual_scene() const { return elemInstance_visual_scene; } 00104 domExtra_Array &getExtra_array() { return elemExtra_array; } 00109 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00110 protected: 00114 domScene(DAE& dae) : daeElement(dae), elemInstance_physics_scene_array(), elemInstance_visual_scene(), elemExtra_array() {} 00118 virtual ~domScene() {} 00122 virtual domScene &operator=( const domScene &cpy ) { (void)cpy; return *this; } 00123 00124 public: // STATIC METHODS 00129 static DLLSPEC daeElementRef create(DAE& dae); 00135 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00136 }; 00137 00138 00139 protected: // Attributes 00143 xsAnyURI attrXmlns; 00148 domVersionType attrVersion; 00153 xsAnyURI attrXml_base; 00154 00155 protected: // Elements 00159 domAssetRef elemAsset; 00164 domLibrary_animations_Array elemLibrary_animations_array; 00169 domLibrary_animation_clips_Array elemLibrary_animation_clips_array; 00174 domLibrary_cameras_Array elemLibrary_cameras_array; 00179 domLibrary_controllers_Array elemLibrary_controllers_array; 00184 domLibrary_geometries_Array elemLibrary_geometries_array; 00189 domLibrary_effects_Array elemLibrary_effects_array; 00194 domLibrary_force_fields_Array elemLibrary_force_fields_array; 00199 domLibrary_images_Array elemLibrary_images_array; 00204 domLibrary_lights_Array elemLibrary_lights_array; 00209 domLibrary_materials_Array elemLibrary_materials_array; 00214 domLibrary_nodes_Array elemLibrary_nodes_array; 00219 domLibrary_physics_materials_Array elemLibrary_physics_materials_array; 00224 domLibrary_physics_models_Array elemLibrary_physics_models_array; 00229 domLibrary_physics_scenes_Array elemLibrary_physics_scenes_array; 00234 domLibrary_visual_scenes_Array elemLibrary_visual_scenes_array; 00242 domSceneRef elemScene; 00246 domExtra_Array elemExtra_array; 00250 daeElementRefArray _contents; 00254 daeUIntArray _contentsOrder; 00255 00259 daeTArray< daeCharArray * > _CMData; 00260 00261 00262 public: //Accessors and Mutators 00267 xsAnyURI &getXmlns() { return attrXmlns; } 00272 const xsAnyURI &getXmlns() const { return attrXmlns; } 00277 void setXmlns( const xsAnyURI &xmlns ) { attrXmlns = xmlns; 00278 _validAttributeArray[0] = true; } 00279 00284 domVersionType getVersion() const { return attrVersion; } 00289 void setVersion( domVersionType atVersion ) { attrVersion = atVersion; _validAttributeArray[1] = true; } 00290 00295 xsAnyURI &getXml_base() { return attrXml_base; } 00300 const xsAnyURI &getXml_base() const { return attrXml_base; } 00305 void setXml_base( const xsAnyURI &atXml_base ) { attrXml_base = atXml_base; _validAttributeArray[2] = true; } 00310 void setXml_base( xsString atXml_base ) { attrXml_base = atXml_base; _validAttributeArray[2] = true; } 00311 00316 const domAssetRef getAsset() const { return elemAsset; } 00321 domLibrary_animations_Array &getLibrary_animations_array() { return elemLibrary_animations_array; } 00326 const domLibrary_animations_Array &getLibrary_animations_array() const { return elemLibrary_animations_array; } 00331 domLibrary_animation_clips_Array &getLibrary_animation_clips_array() { return elemLibrary_animation_clips_array; } 00336 const domLibrary_animation_clips_Array &getLibrary_animation_clips_array() const { return elemLibrary_animation_clips_array; } 00341 domLibrary_cameras_Array &getLibrary_cameras_array() { return elemLibrary_cameras_array; } 00346 const domLibrary_cameras_Array &getLibrary_cameras_array() const { return elemLibrary_cameras_array; } 00351 domLibrary_controllers_Array &getLibrary_controllers_array() { return elemLibrary_controllers_array; } 00356 const domLibrary_controllers_Array &getLibrary_controllers_array() const { return elemLibrary_controllers_array; } 00361 domLibrary_geometries_Array &getLibrary_geometries_array() { return elemLibrary_geometries_array; } 00366 const domLibrary_geometries_Array &getLibrary_geometries_array() const { return elemLibrary_geometries_array; } 00371 domLibrary_effects_Array &getLibrary_effects_array() { return elemLibrary_effects_array; } 00376 const domLibrary_effects_Array &getLibrary_effects_array() const { return elemLibrary_effects_array; } 00381 domLibrary_force_fields_Array &getLibrary_force_fields_array() { return elemLibrary_force_fields_array; } 00386 const domLibrary_force_fields_Array &getLibrary_force_fields_array() const { return elemLibrary_force_fields_array; } 00391 domLibrary_images_Array &getLibrary_images_array() { return elemLibrary_images_array; } 00396 const domLibrary_images_Array &getLibrary_images_array() const { return elemLibrary_images_array; } 00401 domLibrary_lights_Array &getLibrary_lights_array() { return elemLibrary_lights_array; } 00406 const domLibrary_lights_Array &getLibrary_lights_array() const { return elemLibrary_lights_array; } 00411 domLibrary_materials_Array &getLibrary_materials_array() { return elemLibrary_materials_array; } 00416 const domLibrary_materials_Array &getLibrary_materials_array() const { return elemLibrary_materials_array; } 00421 domLibrary_nodes_Array &getLibrary_nodes_array() { return elemLibrary_nodes_array; } 00426 const domLibrary_nodes_Array &getLibrary_nodes_array() const { return elemLibrary_nodes_array; } 00431 domLibrary_physics_materials_Array &getLibrary_physics_materials_array() { return elemLibrary_physics_materials_array; } 00436 const domLibrary_physics_materials_Array &getLibrary_physics_materials_array() const { return elemLibrary_physics_materials_array; } 00441 domLibrary_physics_models_Array &getLibrary_physics_models_array() { return elemLibrary_physics_models_array; } 00446 const domLibrary_physics_models_Array &getLibrary_physics_models_array() const { return elemLibrary_physics_models_array; } 00451 domLibrary_physics_scenes_Array &getLibrary_physics_scenes_array() { return elemLibrary_physics_scenes_array; } 00456 const domLibrary_physics_scenes_Array &getLibrary_physics_scenes_array() const { return elemLibrary_physics_scenes_array; } 00461 domLibrary_visual_scenes_Array &getLibrary_visual_scenes_array() { return elemLibrary_visual_scenes_array; } 00466 const domLibrary_visual_scenes_Array &getLibrary_visual_scenes_array() const { return elemLibrary_visual_scenes_array; } 00471 const domSceneRef getScene() const { return elemScene; } 00476 domExtra_Array &getExtra_array() { return elemExtra_array; } 00481 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00486 daeElementRefArray &getContents() { return _contents; } 00491 const daeElementRefArray &getContents() const { return _contents; } 00492 00493 protected: 00497 domCOLLADA(DAE& dae) : daeElement(dae), attrXmlns(dae, *this), attrVersion(), attrXml_base(dae, *this), elemAsset(), elemLibrary_animations_array(), elemLibrary_animation_clips_array(), elemLibrary_cameras_array(), elemLibrary_controllers_array(), elemLibrary_geometries_array(), elemLibrary_effects_array(), elemLibrary_force_fields_array(), elemLibrary_images_array(), elemLibrary_lights_array(), elemLibrary_materials_array(), elemLibrary_nodes_array(), elemLibrary_physics_materials_array(), elemLibrary_physics_models_array(), elemLibrary_physics_scenes_array(), elemLibrary_visual_scenes_array(), elemScene(), elemExtra_array() {} 00501 virtual ~domCOLLADA() { daeElement::deleteCMDataArray(_CMData); } 00505 virtual domCOLLADA &operator=( const domCOLLADA &cpy ) { (void)cpy; return *this; } 00506 00507 public: // STATIC METHODS 00512 static DLLSPEC daeElementRef create(DAE& dae); 00518 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00519 }; 00520 00521 00522 #endif