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_clip_h__ 00010 #define __domAnimation_clip_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/domExtra.h> 00018 #include <dom/domInstanceWithExtra.h> 00019 class DAE; 00020 00025 class domAnimation_clip : public daeElement 00026 { 00027 public: 00028 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::ANIMATION_CLIP; } 00029 static daeInt ID() { return 652; } 00030 virtual daeInt typeID() const { return ID(); } 00031 protected: // Attributes 00037 xsID attrId; 00041 xsNCName attrName; 00050 xsDouble attrStart; 00057 xsDouble attrEnd; 00058 00059 protected: // Elements 00063 domAssetRef elemAsset; 00067 domInstanceWithExtra_Array elemInstance_animation_array; 00071 domExtra_Array elemExtra_array; 00072 00073 public: //Accessors and Mutators 00078 xsID getId() const { return attrId; } 00083 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 00084 if( _document != NULL ) _document->changeElementID( this, attrId ); 00085 } 00086 00091 xsNCName getName() const { return attrName; } 00096 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 00097 00102 xsDouble getStart() const { return attrStart; } 00107 void setStart( xsDouble atStart ) { attrStart = atStart; _validAttributeArray[2] = true; } 00108 00113 xsDouble getEnd() const { return attrEnd; } 00118 void setEnd( xsDouble atEnd ) { attrEnd = atEnd; _validAttributeArray[3] = true; } 00119 00124 const domAssetRef getAsset() const { return elemAsset; } 00129 domInstanceWithExtra_Array &getInstance_animation_array() { return elemInstance_animation_array; } 00134 const domInstanceWithExtra_Array &getInstance_animation_array() const { return elemInstance_animation_array; } 00139 domExtra_Array &getExtra_array() { return elemExtra_array; } 00144 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00145 protected: 00149 domAnimation_clip(DAE& dae) : daeElement(dae), attrId(), attrName(), attrStart(), attrEnd(), elemAsset(), elemInstance_animation_array(), elemExtra_array() {} 00153 virtual ~domAnimation_clip() {} 00157 virtual domAnimation_clip &operator=( const domAnimation_clip &cpy ) { (void)cpy; return *this; } 00158 00159 public: // STATIC METHODS 00164 static DLLSPEC daeElementRef create(DAE& dae); 00170 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00171 }; 00172 00173 00174 #endif