00001 #ifndef __domCamera_h__ 00002 #define __domCamera_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/domTargetable_float.h> 00010 #include <dom/domTechnique.h> 00011 #include <dom/domExtra.h> 00012 class DAE; 00013 00018 class domCamera : public daeElement 00019 { 00020 public: 00021 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CAMERA; } 00022 static daeInt ID() { return 86; } 00023 virtual daeInt typeID() const { return ID(); } 00024 public: 00025 class domOptics; 00026 00027 typedef daeSmartRef<domOptics> domOpticsRef; 00028 typedef daeTArray<domOpticsRef> domOptics_Array; 00029 00034 class domOptics : public daeElement 00035 { 00036 public: 00037 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::OPTICS; } 00038 static daeInt ID() { return 87; } 00039 virtual daeInt typeID() const { return ID(); } 00040 public: 00041 class domTechnique_common; 00042 00043 typedef daeSmartRef<domTechnique_common> domTechnique_commonRef; 00044 typedef daeTArray<domTechnique_commonRef> domTechnique_common_Array; 00045 00050 class domTechnique_common : public daeElement 00051 { 00052 public: 00053 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TECHNIQUE_COMMON; } 00054 static daeInt ID() { return 88; } 00055 virtual daeInt typeID() const { return ID(); } 00056 public: 00057 class domOrthographic; 00058 00059 typedef daeSmartRef<domOrthographic> domOrthographicRef; 00060 typedef daeTArray<domOrthographicRef> domOrthographic_Array; 00061 00066 class domOrthographic : public daeElement 00067 { 00068 public: 00069 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::ORTHOGRAPHIC; } 00070 static daeInt ID() { return 89; } 00071 virtual daeInt typeID() const { return ID(); } 00072 00073 protected: // Elements 00078 domTargetable_floatRef elemXmag; 00083 domTargetable_floatRef elemYmag; 00090 domTargetable_floatRef elemAspect_ratio; 00096 domTargetable_floatRef elemZnear; 00102 domTargetable_floatRef elemZfar; 00106 daeElementRefArray _contents; 00110 daeUIntArray _contentsOrder; 00111 00115 daeTArray< daeCharArray * > _CMData; 00116 00117 00118 public: //Accessors and Mutators 00123 const domTargetable_floatRef getXmag() const { return elemXmag; } 00128 const domTargetable_floatRef getYmag() const { return elemYmag; } 00133 const domTargetable_floatRef getAspect_ratio() const { return elemAspect_ratio; } 00138 const domTargetable_floatRef getZnear() const { return elemZnear; } 00143 const domTargetable_floatRef getZfar() const { return elemZfar; } 00148 daeElementRefArray &getContents() { return _contents; } 00153 const daeElementRefArray &getContents() const { return _contents; } 00154 00155 protected: 00159 domOrthographic(DAE& dae) : daeElement(dae), elemXmag(), elemYmag(), elemAspect_ratio(), elemZnear(), elemZfar() {} 00163 virtual ~domOrthographic() { daeElement::deleteCMDataArray(_CMData); } 00167 virtual domOrthographic &operator=( const domOrthographic &cpy ) { (void)cpy; return *this; } 00168 00169 public: // STATIC METHODS 00174 static DLLSPEC daeElementRef create(DAE& dae); 00180 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00181 }; 00182 00183 class domPerspective; 00184 00185 typedef daeSmartRef<domPerspective> domPerspectiveRef; 00186 typedef daeTArray<domPerspectiveRef> domPerspective_Array; 00187 00191 class domPerspective : public daeElement 00192 { 00193 public: 00194 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PERSPECTIVE; } 00195 static daeInt ID() { return 90; } 00196 virtual daeInt typeID() const { return ID(); } 00197 00198 protected: // Elements 00203 domTargetable_floatRef elemXfov; 00208 domTargetable_floatRef elemYfov; 00215 domTargetable_floatRef elemAspect_ratio; 00221 domTargetable_floatRef elemZnear; 00227 domTargetable_floatRef elemZfar; 00231 daeElementRefArray _contents; 00235 daeUIntArray _contentsOrder; 00236 00240 daeTArray< daeCharArray * > _CMData; 00241 00242 00243 public: //Accessors and Mutators 00248 const domTargetable_floatRef getXfov() const { return elemXfov; } 00253 const domTargetable_floatRef getYfov() const { return elemYfov; } 00258 const domTargetable_floatRef getAspect_ratio() const { return elemAspect_ratio; } 00263 const domTargetable_floatRef getZnear() const { return elemZnear; } 00268 const domTargetable_floatRef getZfar() const { return elemZfar; } 00273 daeElementRefArray &getContents() { return _contents; } 00278 const daeElementRefArray &getContents() const { return _contents; } 00279 00280 protected: 00284 domPerspective(DAE& dae) : daeElement(dae), elemXfov(), elemYfov(), elemAspect_ratio(), elemZnear(), elemZfar() {} 00288 virtual ~domPerspective() { daeElement::deleteCMDataArray(_CMData); } 00292 virtual domPerspective &operator=( const domPerspective &cpy ) { (void)cpy; return *this; } 00293 00294 public: // STATIC METHODS 00299 static DLLSPEC daeElementRef create(DAE& dae); 00305 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00306 }; 00307 00308 00309 00310 protected: // Elements 00315 domOrthographicRef elemOrthographic; 00320 domPerspectiveRef elemPerspective; 00324 daeElementRefArray _contents; 00328 daeUIntArray _contentsOrder; 00329 00333 daeTArray< daeCharArray * > _CMData; 00334 00335 00336 public: //Accessors and Mutators 00341 const domOrthographicRef getOrthographic() const { return elemOrthographic; } 00346 const domPerspectiveRef getPerspective() const { return elemPerspective; } 00351 daeElementRefArray &getContents() { return _contents; } 00356 const daeElementRefArray &getContents() const { return _contents; } 00357 00358 protected: 00362 domTechnique_common(DAE& dae) : daeElement(dae), elemOrthographic(), elemPerspective() {} 00366 virtual ~domTechnique_common() { daeElement::deleteCMDataArray(_CMData); } 00370 virtual domTechnique_common &operator=( const domTechnique_common &cpy ) { (void)cpy; return *this; } 00371 00372 public: // STATIC METHODS 00377 static DLLSPEC daeElementRef create(DAE& dae); 00383 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00384 }; 00385 00386 00387 00388 protected: // Elements 00393 domTechnique_commonRef elemTechnique_common; 00398 domTechnique_Array elemTechnique_array; 00402 domExtra_Array elemExtra_array; 00403 00404 public: //Accessors and Mutators 00409 const domTechnique_commonRef getTechnique_common() const { return elemTechnique_common; } 00414 domTechnique_Array &getTechnique_array() { return elemTechnique_array; } 00419 const domTechnique_Array &getTechnique_array() const { return elemTechnique_array; } 00424 domExtra_Array &getExtra_array() { return elemExtra_array; } 00429 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00430 protected: 00434 domOptics(DAE& dae) : daeElement(dae), elemTechnique_common(), elemTechnique_array(), elemExtra_array() {} 00438 virtual ~domOptics() {} 00442 virtual domOptics &operator=( const domOptics &cpy ) { (void)cpy; return *this; } 00443 00444 public: // STATIC METHODS 00449 static DLLSPEC daeElementRef create(DAE& dae); 00455 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00456 }; 00457 00458 class domImager; 00459 00460 typedef daeSmartRef<domImager> domImagerRef; 00461 typedef daeTArray<domImagerRef> domImager_Array; 00462 00466 class domImager : public daeElement 00467 { 00468 public: 00469 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::IMAGER; } 00470 static daeInt ID() { return 91; } 00471 virtual daeInt typeID() const { return ID(); } 00472 00473 protected: // Elements 00478 domTechnique_Array elemTechnique_array; 00482 domExtra_Array elemExtra_array; 00483 00484 public: //Accessors and Mutators 00489 domTechnique_Array &getTechnique_array() { return elemTechnique_array; } 00494 const domTechnique_Array &getTechnique_array() const { return elemTechnique_array; } 00499 domExtra_Array &getExtra_array() { return elemExtra_array; } 00504 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00505 protected: 00509 domImager(DAE& dae) : daeElement(dae), elemTechnique_array(), elemExtra_array() {} 00513 virtual ~domImager() {} 00517 virtual domImager &operator=( const domImager &cpy ) { (void)cpy; return *this; } 00518 00519 public: // STATIC METHODS 00524 static DLLSPEC daeElementRef create(DAE& dae); 00530 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00531 }; 00532 00533 00534 protected: // Attributes 00540 xsID attrId; 00544 xsToken attrName; 00545 00546 protected: // Elements 00550 domAssetRef elemAsset; 00555 domOpticsRef elemOptics; 00560 domImagerRef elemImager; 00564 domExtra_Array elemExtra_array; 00565 00566 public: //Accessors and Mutators 00571 xsID getId() const { return attrId; } 00576 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; 00577 if( _document != NULL ) _document->changeElementID( this, attrId ); 00578 } 00579 00584 xsToken getName() const { return attrName; } 00589 void setName( xsToken atName ) { *(daeStringRef*)&attrName = atName;} 00590 00595 const domAssetRef getAsset() const { return elemAsset; } 00600 const domOpticsRef getOptics() const { return elemOptics; } 00605 const domImagerRef getImager() const { return elemImager; } 00610 domExtra_Array &getExtra_array() { return elemExtra_array; } 00615 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00616 protected: 00620 domCamera(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemOptics(), elemImager(), elemExtra_array() {} 00624 virtual ~domCamera() {} 00628 virtual domCamera &operator=( const domCamera &cpy ) { (void)cpy; return *this; } 00629 00630 public: // STATIC METHODS 00635 static DLLSPEC daeElementRef create(DAE& dae); 00641 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00642 }; 00643 00644 00645 #endif