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 __domCapsule_h__ 00010 #define __domCapsule_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domExtra.h> 00017 class DAE; 00018 00022 class domCapsule : public daeElement 00023 { 00024 public: 00025 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CAPSULE; } 00026 static daeInt ID() { return 782; } 00027 virtual daeInt typeID() const { return ID(); } 00028 public: 00029 class domHeight; 00030 00031 typedef daeSmartRef<domHeight> domHeightRef; 00032 typedef daeTArray<domHeightRef> domHeight_Array; 00033 00038 class domHeight : public daeElement 00039 { 00040 public: 00041 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::HEIGHT; } 00042 static daeInt ID() { return 783; } 00043 virtual daeInt typeID() const { return ID(); } 00044 00045 protected: // Value 00049 domFloat _value; 00050 00051 public: //Accessors and Mutators 00056 domFloat getValue() const { return _value; } 00061 void setValue( domFloat val ) { _value = val; } 00062 00063 protected: 00067 domHeight(DAE& dae) : daeElement(dae), _value() {} 00071 virtual ~domHeight() {} 00075 virtual domHeight &operator=( const domHeight &cpy ) { (void)cpy; return *this; } 00076 00077 public: // STATIC METHODS 00082 static DLLSPEC daeElementRef create(DAE& dae); 00088 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00089 }; 00090 00091 class domRadius; 00092 00093 typedef daeSmartRef<domRadius> domRadiusRef; 00094 typedef daeTArray<domRadiusRef> domRadius_Array; 00095 00099 class domRadius : public daeElement 00100 { 00101 public: 00102 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::RADIUS; } 00103 static daeInt ID() { return 784; } 00104 virtual daeInt typeID() const { return ID(); } 00105 00106 protected: // Value 00110 domFloat2 _value; 00111 00112 public: //Accessors and Mutators 00117 domFloat2 &getValue() { return _value; } 00122 const domFloat2 &getValue() const { return _value; } 00127 void setValue( const domFloat2 &val ) { _value = val; } 00128 00129 protected: 00133 domRadius(DAE& dae) : daeElement(dae), _value() {} 00137 virtual ~domRadius() {} 00141 virtual domRadius &operator=( const domRadius &cpy ) { (void)cpy; return *this; } 00142 00143 public: // STATIC METHODS 00148 static DLLSPEC daeElementRef create(DAE& dae); 00154 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00155 }; 00156 00157 00158 00159 protected: // Elements 00164 domHeightRef elemHeight; 00169 domRadiusRef elemRadius; 00173 domExtra_Array elemExtra_array; 00174 00175 public: //Accessors and Mutators 00180 const domHeightRef getHeight() const { return elemHeight; } 00185 const domRadiusRef getRadius() const { return elemRadius; } 00190 domExtra_Array &getExtra_array() { return elemExtra_array; } 00195 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00196 protected: 00200 domCapsule(DAE& dae) : daeElement(dae), elemHeight(), elemRadius(), elemExtra_array() {} 00204 virtual ~domCapsule() {} 00208 virtual domCapsule &operator=( const domCapsule &cpy ) { (void)cpy; return *this; } 00209 00210 public: // STATIC METHODS 00215 static DLLSPEC daeElementRef create(DAE& dae); 00221 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00222 }; 00223 00224 00225 #endif