00001 #ifndef __domSurface_h__ 00002 #define __domSurface_h__ 00003 00004 #include <dae/daeDocument.h> 00005 #include <dom/domTypes.h> 00006 #include <dom/domElements.h> 00007 00008 #include <dom/domPlane.h> 00009 #include <dom/domSphere.h> 00010 #include <dom/domTorus.h> 00011 #include <dom/domSwept_surface.h> 00012 #include <dom/domNurbs_surface.h> 00013 #include <dom/domCone.h> 00014 #include <dom/domExtra.h> 00015 #include <dom/domOrient.h> 00016 #include <dom/domOrigin.h> 00017 class DAE; 00018 00023 class domSurface : public daeElement 00024 { 00025 public: 00026 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SURFACE; } 00027 static daeInt ID() { return 359; } 00028 virtual daeInt typeID() const { return ID(); } 00029 public: 00030 class domCylinder; 00031 00032 typedef daeSmartRef<domCylinder> domCylinderRef; 00033 typedef daeTArray<domCylinderRef> domCylinder_Array; 00034 00035 class domCylinder : public daeElement 00036 { 00037 public: 00038 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CYLINDER; } 00039 static daeInt ID() { return 360; } 00040 virtual daeInt typeID() const { return ID(); } 00041 public: 00042 class domRadius; 00043 00044 typedef daeSmartRef<domRadius> domRadiusRef; 00045 typedef daeTArray<domRadiusRef> domRadius_Array; 00046 00047 class domRadius : public daeElement 00048 { 00049 public: 00050 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::RADIUS; } 00051 static daeInt ID() { return 361; } 00052 virtual daeInt typeID() const { return ID(); } 00053 00054 00055 public: //Accessors and Mutators 00060 domFloat& getValue() { return _value; } 00065 void setValue( const domFloat& val ) { _value = val; } 00066 00067 protected: // Value 00071 domFloat _value; 00072 protected: 00076 domRadius(DAE& dae) : daeElement(dae), _value() {} 00080 virtual ~domRadius() {} 00084 virtual domRadius &operator=( const domRadius &cpy ) { (void)cpy; return *this; } 00085 00086 public: // STATIC METHODS 00091 static DLLSPEC daeElementRef create(DAE& dae); 00097 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00098 }; 00099 00100 00101 00102 protected: // Elements 00103 domRadiusRef elemRadius; 00104 domExtra_Array elemExtra_array; 00105 00106 public: //Accessors and Mutators 00111 const domRadiusRef getRadius() const { return elemRadius; } 00116 domExtra_Array &getExtra_array() { return elemExtra_array; } 00121 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00122 protected: 00126 domCylinder(DAE& dae) : daeElement(dae), elemRadius(), elemExtra_array() {} 00130 virtual ~domCylinder() {} 00134 virtual domCylinder &operator=( const domCylinder &cpy ) { (void)cpy; return *this; } 00135 00136 public: // STATIC METHODS 00141 static DLLSPEC daeElementRef create(DAE& dae); 00147 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00148 }; 00149 00150 00151 protected: // Attributes 00155 domSid attrSid; 00159 xsToken attrName; 00160 00161 protected: // Elements 00162 domPlaneRef elemPlane; 00163 domSphereRef elemSphere; 00164 domTorusRef elemTorus; 00165 domSwept_surfaceRef elemSwept_surface; 00166 domNurbs_surfaceRef elemNurbs_surface; 00167 domConeRef elemCone; 00168 domCylinderRef elemCylinder; 00169 domOrient_Array elemOrient_array; 00170 domOriginRef elemOrigin; 00174 daeElementRefArray _contents; 00178 daeUIntArray _contentsOrder; 00179 00183 daeTArray< daeCharArray * > _CMData; 00184 00185 00186 public: //Accessors and Mutators 00191 domSid getSid() const { return attrSid; } 00196 void setSid( domSid atSid ) { *(daeStringRef*)&attrSid = atSid;} 00197 00202 xsToken getName() const { return attrName; } 00207 void setName( xsToken atName ) { *(daeStringRef*)&attrName = atName;} 00208 00213 const domPlaneRef getPlane() const { return elemPlane; } 00218 const domSphereRef getSphere() const { return elemSphere; } 00223 const domTorusRef getTorus() const { return elemTorus; } 00228 const domSwept_surfaceRef getSwept_surface() const { return elemSwept_surface; } 00233 const domNurbs_surfaceRef getNurbs_surface() const { return elemNurbs_surface; } 00238 const domConeRef getCone() const { return elemCone; } 00243 const domCylinderRef getCylinder() const { return elemCylinder; } 00248 domOrient_Array &getOrient_array() { return elemOrient_array; } 00253 const domOrient_Array &getOrient_array() const { return elemOrient_array; } 00258 const domOriginRef getOrigin() const { return elemOrigin; } 00263 daeElementRefArray &getContents() { return _contents; } 00268 const daeElementRefArray &getContents() const { return _contents; } 00269 00270 protected: 00274 domSurface(DAE& dae) : daeElement(dae), attrSid(), attrName(), elemPlane(), elemSphere(), elemTorus(), elemSwept_surface(), elemNurbs_surface(), elemCone(), elemCylinder(), elemOrient_array(), elemOrigin() {} 00278 virtual ~domSurface() { daeElement::deleteCMDataArray(_CMData); } 00282 virtual domSurface &operator=( const domSurface &cpy ) { (void)cpy; return *this; } 00283 00284 public: // STATIC METHODS 00289 static DLLSPEC daeElementRef create(DAE& dae); 00295 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00296 }; 00297 00298 00299 #endif