00001 #ifndef __domNode_h__ 00002 #define __domNode_h__ 00003 00004 #include <dae/daeDocument.h> 00005 #include <dom/domTypes.h> 00006 #include <dom/domElements.h> 00007 00008 #include <dom/domAsset.h> 00009 #include <dom/domLookat.h> 00010 #include <dom/domMatrix.h> 00011 #include <dom/domRotate.h> 00012 #include <dom/domScale.h> 00013 #include <dom/domSkew.h> 00014 #include <dom/domTranslate.h> 00015 #include <dom/domInstance_camera.h> 00016 #include <dom/domInstance_controller.h> 00017 #include <dom/domInstance_geometry.h> 00018 #include <dom/domInstance_light.h> 00019 #include <dom/domInstance_node.h> 00020 #include <dom/domNode.h> 00021 #include <dom/domExtra.h> 00022 class DAE; 00023 00027 class domNode : public daeElement 00028 { 00029 public: 00030 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::NODE; } 00031 static daeInt ID() { return 386; } 00032 virtual daeInt typeID() const { return ID(); } 00033 protected: // Attributes 00039 xsID attrId; 00043 xsToken attrName; 00049 domSid attrSid; 00054 domNode_enum attrType; 00062 domList_of_names attrLayer; 00063 00064 protected: // Elements 00068 domAssetRef elemAsset; 00072 domLookat_Array elemLookat_array; 00076 domMatrix_Array elemMatrix_array; 00080 domRotate_Array elemRotate_array; 00084 domScale_Array elemScale_array; 00088 domSkew_Array elemSkew_array; 00092 domTranslate_Array elemTranslate_array; 00096 domInstance_camera_Array elemInstance_camera_array; 00100 domInstance_controller_Array elemInstance_controller_array; 00104 domInstance_geometry_Array elemInstance_geometry_array; 00108 domInstance_light_Array elemInstance_light_array; 00113 domInstance_node_Array elemInstance_node_array; 00118 domNode_Array elemNode_array; 00122 domExtra_Array elemExtra_array; 00126 daeElementRefArray _contents; 00130 daeUIntArray _contentsOrder; 00131 00135 daeTArray< daeCharArray * > _CMData; 00136 00137 00138 public: //Accessors and Mutators 00143 xsID getId() const { return attrId; } 00148 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; 00149 if( _document != NULL ) _document->changeElementID( this, attrId ); 00150 } 00151 00156 xsToken getName() const { return attrName; } 00161 void setName( xsToken atName ) { *(daeStringRef*)&attrName = atName;} 00162 00167 domSid getSid() const { return attrSid; } 00172 void setSid( domSid atSid ) { *(daeStringRef*)&attrSid = atSid;} 00173 00178 domNode_enum getType() const { return attrType; } 00183 void setType( domNode_enum atType ) { attrType = atType; } 00184 00189 domList_of_names getLayer() const { return attrLayer; } 00194 void setLayer( domList_of_names atLayer ) { attrLayer = atLayer; } 00195 00200 const domAssetRef getAsset() const { return elemAsset; } 00205 domLookat_Array &getLookat_array() { return elemLookat_array; } 00210 const domLookat_Array &getLookat_array() const { return elemLookat_array; } 00215 domMatrix_Array &getMatrix_array() { return elemMatrix_array; } 00220 const domMatrix_Array &getMatrix_array() const { return elemMatrix_array; } 00225 domRotate_Array &getRotate_array() { return elemRotate_array; } 00230 const domRotate_Array &getRotate_array() const { return elemRotate_array; } 00235 domScale_Array &getScale_array() { return elemScale_array; } 00240 const domScale_Array &getScale_array() const { return elemScale_array; } 00245 domSkew_Array &getSkew_array() { return elemSkew_array; } 00250 const domSkew_Array &getSkew_array() const { return elemSkew_array; } 00255 domTranslate_Array &getTranslate_array() { return elemTranslate_array; } 00260 const domTranslate_Array &getTranslate_array() const { return elemTranslate_array; } 00265 domInstance_camera_Array &getInstance_camera_array() { return elemInstance_camera_array; } 00270 const domInstance_camera_Array &getInstance_camera_array() const { return elemInstance_camera_array; } 00275 domInstance_controller_Array &getInstance_controller_array() { return elemInstance_controller_array; } 00280 const domInstance_controller_Array &getInstance_controller_array() const { return elemInstance_controller_array; } 00285 domInstance_geometry_Array &getInstance_geometry_array() { return elemInstance_geometry_array; } 00290 const domInstance_geometry_Array &getInstance_geometry_array() const { return elemInstance_geometry_array; } 00295 domInstance_light_Array &getInstance_light_array() { return elemInstance_light_array; } 00300 const domInstance_light_Array &getInstance_light_array() const { return elemInstance_light_array; } 00305 domInstance_node_Array &getInstance_node_array() { return elemInstance_node_array; } 00310 const domInstance_node_Array &getInstance_node_array() const { return elemInstance_node_array; } 00315 domNode_Array &getNode_array() { return elemNode_array; } 00320 const domNode_Array &getNode_array() const { return elemNode_array; } 00325 domExtra_Array &getExtra_array() { return elemExtra_array; } 00330 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00335 daeElementRefArray &getContents() { return _contents; } 00340 const daeElementRefArray &getContents() const { return _contents; } 00341 00342 protected: 00346 domNode(DAE& dae) : daeElement(dae), attrId(), attrName(), attrSid(), attrType(), attrLayer(), elemAsset(), elemLookat_array(), elemMatrix_array(), elemRotate_array(), elemScale_array(), elemSkew_array(), elemTranslate_array(), elemInstance_camera_array(), elemInstance_controller_array(), elemInstance_geometry_array(), elemInstance_light_array(), elemInstance_node_array(), elemNode_array(), elemExtra_array() {} 00350 virtual ~domNode() { daeElement::deleteCMDataArray(_CMData); } 00354 virtual domNode &operator=( const domNode &cpy ) { (void)cpy; return *this; } 00355 00356 public: // STATIC METHODS 00361 static DLLSPEC daeElementRef create(DAE& dae); 00367 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00368 }; 00369 00370 00371 #endif