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 __domAnimation_h__ 00010 #define __domAnimation_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/domSource.h> 00018 #include <dom/domSampler.h> 00019 #include <dom/domChannel.h> 00020 #include <dom/domAnimation.h> 00021 #include <dom/domExtra.h> 00022 class DAE; 00023 00030 class domAnimation : public daeElement 00031 { 00032 public: 00033 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::ANIMATION; } 00034 static daeInt ID() { return 651; } 00035 virtual daeInt typeID() const { return ID(); } 00036 protected: // Attributes 00042 xsID attrId; 00046 xsNCName attrName; 00047 00048 protected: // Elements 00052 domAssetRef elemAsset; 00057 domSource_Array elemSource_array; 00062 domSampler_Array elemSampler_array; 00067 domChannel_Array elemChannel_array; 00072 domAnimation_Array elemAnimation_array; 00076 domExtra_Array elemExtra_array; 00080 daeElementRefArray _contents; 00084 daeUIntArray _contentsOrder; 00085 00089 daeTArray< daeCharArray * > _CMData; 00090 00091 00092 public: //Accessors and Mutators 00097 xsID getId() const { return attrId; } 00102 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 00103 if( _document != NULL ) _document->changeElementID( this, attrId ); 00104 } 00105 00110 xsNCName getName() const { return attrName; } 00115 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 00116 00121 const domAssetRef getAsset() const { return elemAsset; } 00126 domSource_Array &getSource_array() { return elemSource_array; } 00131 const domSource_Array &getSource_array() const { return elemSource_array; } 00136 domSampler_Array &getSampler_array() { return elemSampler_array; } 00141 const domSampler_Array &getSampler_array() const { return elemSampler_array; } 00146 domChannel_Array &getChannel_array() { return elemChannel_array; } 00151 const domChannel_Array &getChannel_array() const { return elemChannel_array; } 00156 domAnimation_Array &getAnimation_array() { return elemAnimation_array; } 00161 const domAnimation_Array &getAnimation_array() const { return elemAnimation_array; } 00166 domExtra_Array &getExtra_array() { return elemExtra_array; } 00171 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00176 daeElementRefArray &getContents() { return _contents; } 00181 const daeElementRefArray &getContents() const { return _contents; } 00182 00183 protected: 00187 domAnimation(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemSource_array(), elemSampler_array(), elemChannel_array(), elemAnimation_array(), elemExtra_array() {} 00191 virtual ~domAnimation() { daeElement::deleteCMDataArray(_CMData); } 00195 virtual domAnimation &operator=( const domAnimation &cpy ) { (void)cpy; return *this; } 00196 00197 public: // STATIC METHODS 00202 static DLLSPEC daeElementRef create(DAE& dae); 00208 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00209 }; 00210 00211 00212 #endif