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 __domCamera_h__ 00010 #define __domCamera_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/domTechnique.h> 00019 #include <dom/domTargetableFloat.h> 00020 class DAE; 00021 00026 class domCamera : public daeElement 00027 { 00028 public: 00029 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CAMERA; } 00030 static daeInt ID() { return 645; } 00031 virtual daeInt typeID() const { return ID(); } 00032 public: 00033 class domOptics; 00034 00035 typedef daeSmartRef<domOptics> domOpticsRef; 00036 typedef daeTArray<domOpticsRef> domOptics_Array; 00037 00042 class domOptics : public daeElement 00043 { 00044 public: 00045 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::OPTICS; } 00046 static daeInt ID() { return 646; } 00047 virtual daeInt typeID() const { return ID(); } 00048 public: 00049 class domTechnique_common; 00050 00051 typedef daeSmartRef<domTechnique_common> domTechnique_commonRef; 00052 typedef daeTArray<domTechnique_commonRef> domTechnique_common_Array; 00053 00058 class domTechnique_common : public daeElement 00059 { 00060 public: 00061 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TECHNIQUE_COMMON; } 00062 static daeInt ID() { return 647; } 00063 virtual daeInt typeID() const { return ID(); } 00064 public: 00065 class domOrthographic; 00066 00067 typedef daeSmartRef<domOrthographic> domOrthographicRef; 00068 typedef daeTArray<domOrthographicRef> domOrthographic_Array; 00069 00074 class domOrthographic : public daeElement 00075 { 00076 public: 00077 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::ORTHOGRAPHIC; } 00078 static daeInt ID() { return 648; } 00079 virtual daeInt typeID() const { return ID(); } 00080 00081 protected: // Elements 00086 domTargetableFloatRef elemXmag; 00091 domTargetableFloatRef elemYmag; 00098 domTargetableFloatRef elemAspect_ratio; 00104 domTargetableFloatRef elemZnear; 00110 domTargetableFloatRef elemZfar; 00114 daeElementRefArray _contents; 00118 daeUIntArray _contentsOrder; 00119 00123 daeTArray< daeCharArray * > _CMData; 00124 00125 00126 public: //Accessors and Mutators 00131 const domTargetableFloatRef getXmag() const { return elemXmag; } 00136 const domTargetableFloatRef getYmag() const { return elemYmag; } 00141 const domTargetableFloatRef getAspect_ratio() const { return elemAspect_ratio; } 00146 const domTargetableFloatRef getZnear() const { return elemZnear; } 00151 const domTargetableFloatRef getZfar() const { return elemZfar; } 00156 daeElementRefArray &getContents() { return _contents; } 00161 const daeElementRefArray &getContents() const { return _contents; } 00162 00163 protected: 00167 domOrthographic(DAE& dae) : daeElement(dae), elemXmag(), elemYmag(), elemAspect_ratio(), elemZnear(), elemZfar() {} 00171 virtual ~domOrthographic() { daeElement::deleteCMDataArray(_CMData); } 00175 virtual domOrthographic &operator=( const domOrthographic &cpy ) { (void)cpy; return *this; } 00176 00177 public: // STATIC METHODS 00182 static DLLSPEC daeElementRef create(DAE& dae); 00188 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00189 }; 00190 00191 class domPerspective; 00192 00193 typedef daeSmartRef<domPerspective> domPerspectiveRef; 00194 typedef daeTArray<domPerspectiveRef> domPerspective_Array; 00195 00199 class domPerspective : public daeElement 00200 { 00201 public: 00202 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PERSPECTIVE; } 00203 static daeInt ID() { return 649; } 00204 virtual daeInt typeID() const { return ID(); } 00205 00206 protected: // Elements 00211 domTargetableFloatRef elemXfov; 00216 domTargetableFloatRef elemYfov; 00223 domTargetableFloatRef elemAspect_ratio; 00229 domTargetableFloatRef elemZnear; 00235 domTargetableFloatRef elemZfar; 00239 daeElementRefArray _contents; 00243 daeUIntArray _contentsOrder; 00244 00248 daeTArray< daeCharArray * > _CMData; 00249 00250 00251 public: //Accessors and Mutators 00256 const domTargetableFloatRef getXfov() const { return elemXfov; } 00261 const domTargetableFloatRef getYfov() const { return elemYfov; } 00266 const domTargetableFloatRef getAspect_ratio() const { return elemAspect_ratio; } 00271 const domTargetableFloatRef getZnear() const { return elemZnear; } 00276 const domTargetableFloatRef getZfar() const { return elemZfar; } 00281 daeElementRefArray &getContents() { return _contents; } 00286 const daeElementRefArray &getContents() const { return _contents; } 00287 00288 protected: 00292 domPerspective(DAE& dae) : daeElement(dae), elemXfov(), elemYfov(), elemAspect_ratio(), elemZnear(), elemZfar() {} 00296 virtual ~domPerspective() { daeElement::deleteCMDataArray(_CMData); } 00300 virtual domPerspective &operator=( const domPerspective &cpy ) { (void)cpy; return *this; } 00301 00302 public: // STATIC METHODS 00307 static DLLSPEC daeElementRef create(DAE& dae); 00313 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00314 }; 00315 00316 00317 00318 protected: // Elements 00323 domOrthographicRef elemOrthographic; 00328 domPerspectiveRef elemPerspective; 00332 daeElementRefArray _contents; 00336 daeUIntArray _contentsOrder; 00337 00341 daeTArray< daeCharArray * > _CMData; 00342 00343 00344 public: //Accessors and Mutators 00349 const domOrthographicRef getOrthographic() const { return elemOrthographic; } 00354 const domPerspectiveRef getPerspective() const { return elemPerspective; } 00359 daeElementRefArray &getContents() { return _contents; } 00364 const daeElementRefArray &getContents() const { return _contents; } 00365 00366 protected: 00370 domTechnique_common(DAE& dae) : daeElement(dae), elemOrthographic(), elemPerspective() {} 00374 virtual ~domTechnique_common() { daeElement::deleteCMDataArray(_CMData); } 00378 virtual domTechnique_common &operator=( const domTechnique_common &cpy ) { (void)cpy; return *this; } 00379 00380 public: // STATIC METHODS 00385 static DLLSPEC daeElementRef create(DAE& dae); 00391 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00392 }; 00393 00394 00395 00396 protected: // Elements 00401 domTechnique_commonRef elemTechnique_common; 00406 domTechnique_Array elemTechnique_array; 00410 domExtra_Array elemExtra_array; 00411 00412 public: //Accessors and Mutators 00417 const domTechnique_commonRef getTechnique_common() const { return elemTechnique_common; } 00422 domTechnique_Array &getTechnique_array() { return elemTechnique_array; } 00427 const domTechnique_Array &getTechnique_array() const { return elemTechnique_array; } 00432 domExtra_Array &getExtra_array() { return elemExtra_array; } 00437 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00438 protected: 00442 domOptics(DAE& dae) : daeElement(dae), elemTechnique_common(), elemTechnique_array(), elemExtra_array() {} 00446 virtual ~domOptics() {} 00450 virtual domOptics &operator=( const domOptics &cpy ) { (void)cpy; return *this; } 00451 00452 public: // STATIC METHODS 00457 static DLLSPEC daeElementRef create(DAE& dae); 00463 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00464 }; 00465 00466 class domImager; 00467 00468 typedef daeSmartRef<domImager> domImagerRef; 00469 typedef daeTArray<domImagerRef> domImager_Array; 00470 00474 class domImager : public daeElement 00475 { 00476 public: 00477 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::IMAGER; } 00478 static daeInt ID() { return 650; } 00479 virtual daeInt typeID() const { return ID(); } 00480 00481 protected: // Elements 00486 domTechnique_Array elemTechnique_array; 00490 domExtra_Array elemExtra_array; 00491 00492 public: //Accessors and Mutators 00497 domTechnique_Array &getTechnique_array() { return elemTechnique_array; } 00502 const domTechnique_Array &getTechnique_array() const { return elemTechnique_array; } 00507 domExtra_Array &getExtra_array() { return elemExtra_array; } 00512 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00513 protected: 00517 domImager(DAE& dae) : daeElement(dae), elemTechnique_array(), elemExtra_array() {} 00521 virtual ~domImager() {} 00525 virtual domImager &operator=( const domImager &cpy ) { (void)cpy; return *this; } 00526 00527 public: // STATIC METHODS 00532 static DLLSPEC daeElementRef create(DAE& dae); 00538 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00539 }; 00540 00541 00542 protected: // Attributes 00548 xsID attrId; 00552 xsNCName attrName; 00553 00554 protected: // Elements 00558 domAssetRef elemAsset; 00563 domOpticsRef elemOptics; 00568 domImagerRef elemImager; 00572 domExtra_Array elemExtra_array; 00573 00574 public: //Accessors and Mutators 00579 xsID getId() const { return attrId; } 00584 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 00585 if( _document != NULL ) _document->changeElementID( this, attrId ); 00586 } 00587 00592 xsNCName getName() const { return attrName; } 00597 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 00598 00603 const domAssetRef getAsset() const { return elemAsset; } 00608 const domOpticsRef getOptics() const { return elemOptics; } 00613 const domImagerRef getImager() const { return elemImager; } 00618 domExtra_Array &getExtra_array() { return elemExtra_array; } 00623 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00624 protected: 00628 domCamera(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemOptics(), elemImager(), elemExtra_array() {} 00632 virtual ~domCamera() {} 00636 virtual domCamera &operator=( const domCamera &cpy ) { (void)cpy; return *this; } 00637 00638 public: // STATIC METHODS 00643 static DLLSPEC daeElementRef create(DAE& dae); 00649 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00650 }; 00651 00652 00653 #endif