00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __domProfile_GLSL_h__
00010 #define __domProfile_GLSL_h__
00011
00012 #include <dae/daeDocument.h>
00013 #include <dom/domTypes.h>
00014 #include <dom/domElements.h>
00015
00016 #include <dom/domFx_profile_abstract.h>
00017 #include <dom/domAsset.h>
00018 #include <dom/domImage.h>
00019 #include <dom/domExtra.h>
00020 #include <dom/domFx_code_profile.h>
00021 #include <dom/domFx_include_common.h>
00022 #include <dom/domGlsl_newparam.h>
00023 #include <dom/domFx_annotate_common.h>
00024 #include <dom/domGlsl_setparam.h>
00025 #include <dom/domGl_pipeline_settings.h>
00026 #include <dom/domFx_colortarget_common.h>
00027 #include <dom/domFx_depthtarget_common.h>
00028 #include <dom/domFx_stenciltarget_common.h>
00029 #include <dom/domFx_clearcolor_common.h>
00030 #include <dom/domFx_cleardepth_common.h>
00031 #include <dom/domFx_clearstencil_common.h>
00032 #include <dom/domGlsl_param_type.h>
00033 class DAE;
00034
00038 class domProfile_GLSL : public domFx_profile_abstract
00039 {
00040 public:
00041 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PROFILE_GLSL; }
00042 static daeInt ID() { return 730; }
00043 virtual daeInt typeID() const { return ID(); }
00044 public:
00045 class domTechnique;
00046
00047 typedef daeSmartRef<domTechnique> domTechniqueRef;
00048 typedef daeTArray<domTechniqueRef> domTechnique_Array;
00049
00054 class domTechnique : public daeElement
00055 {
00056 public:
00057 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TECHNIQUE; }
00058 static daeInt ID() { return 731; }
00059 virtual daeInt typeID() const { return ID(); }
00060 public:
00061 class domPass;
00062
00063 typedef daeSmartRef<domPass> domPassRef;
00064 typedef daeTArray<domPassRef> domPass_Array;
00065
00070 class domPass : public daeElement
00071 {
00072 public:
00073 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PASS; }
00074 static daeInt ID() { return 732; }
00075 virtual daeInt typeID() const { return ID(); }
00076 public:
00077 class domDraw;
00078
00079 typedef daeSmartRef<domDraw> domDrawRef;
00080 typedef daeTArray<domDrawRef> domDraw_Array;
00081
00082 class domDraw : public daeElement
00083 {
00084 public:
00085 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::DRAW; }
00086 static daeInt ID() { return 733; }
00087 virtual daeInt typeID() const { return ID(); }
00088
00089 protected:
00093 domFx_draw_common _value;
00094
00095 public:
00100 domFx_draw_common getValue() const { return _value; }
00105 void setValue( domFx_draw_common val ) { _value = val; }
00106
00107 protected:
00111 domDraw(DAE& dae) : daeElement(dae), _value() {}
00115 virtual ~domDraw() {}
00119 virtual domDraw &operator=( const domDraw &cpy ) { (void)cpy; return *this; }
00120
00121 public:
00126 static DLLSPEC daeElementRef create(DAE& dae);
00132 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00133 };
00134
00135 class domShader;
00136
00137 typedef daeSmartRef<domShader> domShaderRef;
00138 typedef daeTArray<domShaderRef> domShader_Array;
00139
00144 class domShader : public daeElement
00145 {
00146 public:
00147 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SHADER; }
00148 static daeInt ID() { return 734; }
00149 virtual daeInt typeID() const { return ID(); }
00150 public:
00151 class domCompiler_target;
00152
00153 typedef daeSmartRef<domCompiler_target> domCompiler_targetRef;
00154 typedef daeTArray<domCompiler_targetRef> domCompiler_target_Array;
00155
00160 class domCompiler_target : public daeElement
00161 {
00162 public:
00163 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::COMPILER_TARGET; }
00164 static daeInt ID() { return 735; }
00165 virtual daeInt typeID() const { return ID(); }
00166
00167 protected:
00171 xsNMTOKEN _value;
00172
00173 public:
00178 xsNMTOKEN getValue() const { return _value; }
00183 void setValue( xsNMTOKEN val ) { *(daeStringRef*)&_value = val; }
00184
00185 protected:
00189 domCompiler_target(DAE& dae) : daeElement(dae), _value() {}
00193 virtual ~domCompiler_target() {}
00197 virtual domCompiler_target &operator=( const domCompiler_target &cpy ) { (void)cpy; return *this; }
00198
00199 public:
00204 static DLLSPEC daeElementRef create(DAE& dae);
00210 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00211 };
00212
00213 class domCompiler_options;
00214
00215 typedef daeSmartRef<domCompiler_options> domCompiler_optionsRef;
00216 typedef daeTArray<domCompiler_optionsRef> domCompiler_options_Array;
00217
00221 class domCompiler_options : public daeElement
00222 {
00223 public:
00224 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::COMPILER_OPTIONS; }
00225 static daeInt ID() { return 736; }
00226 virtual daeInt typeID() const { return ID(); }
00227
00228 protected:
00232 xsString _value;
00233
00234 public:
00239 xsString getValue() const { return _value; }
00244 void setValue( xsString val ) { *(daeStringRef*)&_value = val; }
00245
00246 protected:
00250 domCompiler_options(DAE& dae) : daeElement(dae), _value() {}
00254 virtual ~domCompiler_options() {}
00258 virtual domCompiler_options &operator=( const domCompiler_options &cpy ) { (void)cpy; return *this; }
00259
00260 public:
00265 static DLLSPEC daeElementRef create(DAE& dae);
00271 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00272 };
00273
00274 class domName;
00275
00276 typedef daeSmartRef<domName> domNameRef;
00277 typedef daeTArray<domNameRef> domName_Array;
00278
00282 class domName : public daeElement
00283 {
00284 public:
00285 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::NAME; }
00286 static daeInt ID() { return 737; }
00287 virtual daeInt typeID() const { return ID(); }
00288 protected:
00289 xsNCName attrSource;
00290
00291 protected:
00295 xsNCName _value;
00296
00297 public:
00302 xsNCName getSource() const { return attrSource; }
00307 void setSource( xsNCName atSource ) { *(daeStringRef*)&attrSource = atSource; _validAttributeArray[0] = true; }
00308
00313 xsNCName getValue() const { return _value; }
00318 void setValue( xsNCName val ) { *(daeStringRef*)&_value = val; }
00319
00320 protected:
00324 domName(DAE& dae) : daeElement(dae), attrSource(), _value() {}
00328 virtual ~domName() {}
00332 virtual domName &operator=( const domName &cpy ) { (void)cpy; return *this; }
00333
00334 public:
00339 static DLLSPEC daeElementRef create(DAE& dae);
00345 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00346 };
00347
00348 class domBind;
00349
00350 typedef daeSmartRef<domBind> domBindRef;
00351 typedef daeTArray<domBindRef> domBind_Array;
00352
00356 class domBind : public daeElement
00357 {
00358 public:
00359 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::BIND; }
00360 static daeInt ID() { return 738; }
00361 virtual daeInt typeID() const { return ID(); }
00362 public:
00363 class domParam;
00364
00365 typedef daeSmartRef<domParam> domParamRef;
00366 typedef daeTArray<domParamRef> domParam_Array;
00367
00368 class domParam : public daeElement
00369 {
00370 public:
00371 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PARAM; }
00372 static daeInt ID() { return 739; }
00373 virtual daeInt typeID() const { return ID(); }
00374 protected:
00375 xsString attrRef;
00376
00377
00378 public:
00383 xsString getRef() const { return attrRef; }
00388 void setRef( xsString atRef ) { *(daeStringRef*)&attrRef = atRef; _validAttributeArray[0] = true; }
00389
00390 protected:
00394 domParam(DAE& dae) : daeElement(dae), attrRef() {}
00398 virtual ~domParam() {}
00402 virtual domParam &operator=( const domParam &cpy ) { (void)cpy; return *this; }
00403
00404 public:
00409 static DLLSPEC daeElementRef create(DAE& dae);
00415 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00416 };
00417
00418
00419 protected:
00424 xsNCName attrSymbol;
00425
00426 protected:
00427 domGlsl_param_typeRef elemGlsl_param_type;
00428 domParamRef elemParam;
00432 daeElementRefArray _contents;
00436 daeUIntArray _contentsOrder;
00437
00441 daeTArray< daeCharArray * > _CMData;
00442
00443
00444 public:
00449 xsNCName getSymbol() const { return attrSymbol; }
00454 void setSymbol( xsNCName atSymbol ) { *(daeStringRef*)&attrSymbol = atSymbol; _validAttributeArray[0] = true; }
00455
00460 const domGlsl_param_typeRef getGlsl_param_type() const { return elemGlsl_param_type; }
00465 const domParamRef getParam() const { return elemParam; }
00470 daeElementRefArray &getContents() { return _contents; }
00475 const daeElementRefArray &getContents() const { return _contents; }
00476
00477 protected:
00481 domBind(DAE& dae) : daeElement(dae), attrSymbol(), elemGlsl_param_type(), elemParam() {}
00485 virtual ~domBind() { daeElement::deleteCMDataArray(_CMData); }
00489 virtual domBind &operator=( const domBind &cpy ) { (void)cpy; return *this; }
00490
00491 public:
00496 static DLLSPEC daeElementRef create(DAE& dae);
00502 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00503 };
00504
00505
00506 protected:
00511 domGlsl_pipeline_stage attrStage;
00512
00513 protected:
00514 domFx_annotate_common_Array elemAnnotate_array;
00519 domCompiler_targetRef elemCompiler_target;
00524 domCompiler_optionsRef elemCompiler_options;
00528 domNameRef elemName;
00532 domBind_Array elemBind_array;
00533
00534 public:
00539 domGlsl_pipeline_stage getStage() const { return attrStage; }
00544 void setStage( domGlsl_pipeline_stage atStage ) { attrStage = atStage; _validAttributeArray[0] = true; }
00545
00550 domFx_annotate_common_Array &getAnnotate_array() { return elemAnnotate_array; }
00555 const domFx_annotate_common_Array &getAnnotate_array() const { return elemAnnotate_array; }
00560 const domCompiler_targetRef getCompiler_target() const { return elemCompiler_target; }
00565 const domCompiler_optionsRef getCompiler_options() const { return elemCompiler_options; }
00570 const domNameRef getName() const { return elemName; }
00575 domBind_Array &getBind_array() { return elemBind_array; }
00580 const domBind_Array &getBind_array() const { return elemBind_array; }
00581 protected:
00585 domShader(DAE& dae) : daeElement(dae), attrStage(), elemAnnotate_array(), elemCompiler_target(), elemCompiler_options(), elemName(), elemBind_array() {}
00589 virtual ~domShader() {}
00593 virtual domShader &operator=( const domShader &cpy ) { (void)cpy; return *this; }
00594
00595 public:
00600 static DLLSPEC daeElementRef create(DAE& dae);
00606 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00607 };
00608
00609
00610 protected:
00616 xsNCName attrSid;
00617
00618 protected:
00619 domFx_annotate_common_Array elemAnnotate_array;
00620 domFx_colortarget_common_Array elemColor_target_array;
00621 domFx_depthtarget_common_Array elemDepth_target_array;
00622 domFx_stenciltarget_common_Array elemStencil_target_array;
00623 domFx_clearcolor_common_Array elemColor_clear_array;
00624 domFx_cleardepth_common_Array elemDepth_clear_array;
00625 domFx_clearstencil_common_Array elemStencil_clear_array;
00626 domDrawRef elemDraw;
00627 domGl_pipeline_settings_Array elemGl_pipeline_settings_array;
00632 domShader_Array elemShader_array;
00633 domExtra_Array elemExtra_array;
00637 daeElementRefArray _contents;
00641 daeUIntArray _contentsOrder;
00642
00646 daeTArray< daeCharArray * > _CMData;
00647
00648
00649 public:
00654 xsNCName getSid() const { return attrSid; }
00659 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; }
00660
00665 domFx_annotate_common_Array &getAnnotate_array() { return elemAnnotate_array; }
00670 const domFx_annotate_common_Array &getAnnotate_array() const { return elemAnnotate_array; }
00675 domFx_colortarget_common_Array &getColor_target_array() { return elemColor_target_array; }
00680 const domFx_colortarget_common_Array &getColor_target_array() const { return elemColor_target_array; }
00685 domFx_depthtarget_common_Array &getDepth_target_array() { return elemDepth_target_array; }
00690 const domFx_depthtarget_common_Array &getDepth_target_array() const { return elemDepth_target_array; }
00695 domFx_stenciltarget_common_Array &getStencil_target_array() { return elemStencil_target_array; }
00700 const domFx_stenciltarget_common_Array &getStencil_target_array() const { return elemStencil_target_array; }
00705 domFx_clearcolor_common_Array &getColor_clear_array() { return elemColor_clear_array; }
00710 const domFx_clearcolor_common_Array &getColor_clear_array() const { return elemColor_clear_array; }
00715 domFx_cleardepth_common_Array &getDepth_clear_array() { return elemDepth_clear_array; }
00720 const domFx_cleardepth_common_Array &getDepth_clear_array() const { return elemDepth_clear_array; }
00725 domFx_clearstencil_common_Array &getStencil_clear_array() { return elemStencil_clear_array; }
00730 const domFx_clearstencil_common_Array &getStencil_clear_array() const { return elemStencil_clear_array; }
00735 const domDrawRef getDraw() const { return elemDraw; }
00740 domGl_pipeline_settings_Array &getGl_pipeline_settings_array() { return elemGl_pipeline_settings_array; }
00745 const domGl_pipeline_settings_Array &getGl_pipeline_settings_array() const { return elemGl_pipeline_settings_array; }
00750 domShader_Array &getShader_array() { return elemShader_array; }
00755 const domShader_Array &getShader_array() const { return elemShader_array; }
00760 domExtra_Array &getExtra_array() { return elemExtra_array; }
00765 const domExtra_Array &getExtra_array() const { return elemExtra_array; }
00770 daeElementRefArray &getContents() { return _contents; }
00775 const daeElementRefArray &getContents() const { return _contents; }
00776
00777 protected:
00781 domPass(DAE& dae) : daeElement(dae), attrSid(), elemAnnotate_array(), elemColor_target_array(), elemDepth_target_array(), elemStencil_target_array(), elemColor_clear_array(), elemDepth_clear_array(), elemStencil_clear_array(), elemDraw(), elemGl_pipeline_settings_array(), elemShader_array(), elemExtra_array() {}
00785 virtual ~domPass() { daeElement::deleteCMDataArray(_CMData); }
00789 virtual domPass &operator=( const domPass &cpy ) { (void)cpy; return *this; }
00790
00791 public:
00796 static DLLSPEC daeElementRef create(DAE& dae);
00802 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00803 };
00804
00805
00806 protected:
00812 xsID attrId;
00818 xsNCName attrSid;
00819
00820 protected:
00821 domFx_annotate_common_Array elemAnnotate_array;
00822 domFx_code_profile_Array elemCode_array;
00823 domFx_include_common_Array elemInclude_array;
00824 domImage_Array elemImage_array;
00825 domGlsl_newparam_Array elemNewparam_array;
00826 domGlsl_setparam_Array elemSetparam_array;
00831 domPass_Array elemPass_array;
00832 domExtra_Array elemExtra_array;
00836 daeElementRefArray _contents;
00840 daeUIntArray _contentsOrder;
00841
00845 daeTArray< daeCharArray * > _CMData;
00846
00847
00848 public:
00853 xsID getId() const { return attrId; }
00858 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true;
00859 if( _document != NULL ) _document->changeElementID( this, attrId );
00860 }
00861
00866 xsNCName getSid() const { return attrSid; }
00871 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[1] = true; }
00872
00877 domFx_annotate_common_Array &getAnnotate_array() { return elemAnnotate_array; }
00882 const domFx_annotate_common_Array &getAnnotate_array() const { return elemAnnotate_array; }
00887 domFx_code_profile_Array &getCode_array() { return elemCode_array; }
00892 const domFx_code_profile_Array &getCode_array() const { return elemCode_array; }
00897 domFx_include_common_Array &getInclude_array() { return elemInclude_array; }
00902 const domFx_include_common_Array &getInclude_array() const { return elemInclude_array; }
00907 domImage_Array &getImage_array() { return elemImage_array; }
00912 const domImage_Array &getImage_array() const { return elemImage_array; }
00917 domGlsl_newparam_Array &getNewparam_array() { return elemNewparam_array; }
00922 const domGlsl_newparam_Array &getNewparam_array() const { return elemNewparam_array; }
00927 domGlsl_setparam_Array &getSetparam_array() { return elemSetparam_array; }
00932 const domGlsl_setparam_Array &getSetparam_array() const { return elemSetparam_array; }
00937 domPass_Array &getPass_array() { return elemPass_array; }
00942 const domPass_Array &getPass_array() const { return elemPass_array; }
00947 domExtra_Array &getExtra_array() { return elemExtra_array; }
00952 const domExtra_Array &getExtra_array() const { return elemExtra_array; }
00957 daeElementRefArray &getContents() { return _contents; }
00962 const daeElementRefArray &getContents() const { return _contents; }
00963
00964 protected:
00968 domTechnique(DAE& dae) : daeElement(dae), attrId(), attrSid(), elemAnnotate_array(), elemCode_array(), elemInclude_array(), elemImage_array(), elemNewparam_array(), elemSetparam_array(), elemPass_array(), elemExtra_array() {}
00972 virtual ~domTechnique() { daeElement::deleteCMDataArray(_CMData); }
00976 virtual domTechnique &operator=( const domTechnique &cpy ) { (void)cpy; return *this; }
00977
00978 public:
00983 static DLLSPEC daeElementRef create(DAE& dae);
00989 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00990 };
00991
00992
00993 protected:
00999 xsID attrId;
01000
01001 protected:
01002 domAssetRef elemAsset;
01003 domFx_code_profile_Array elemCode_array;
01004 domFx_include_common_Array elemInclude_array;
01005 domImage_Array elemImage_array;
01006 domGlsl_newparam_Array elemNewparam_array;
01011 domTechnique_Array elemTechnique_array;
01012 domExtra_Array elemExtra_array;
01016 daeElementRefArray _contents;
01020 daeUIntArray _contentsOrder;
01021
01025 daeTArray< daeCharArray * > _CMData;
01026
01027
01028 public:
01033 xsID getId() const { return attrId; }
01038 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true;
01039 if( _document != NULL ) _document->changeElementID( this, attrId );
01040 }
01041
01046 const domAssetRef getAsset() const { return elemAsset; }
01051 domFx_code_profile_Array &getCode_array() { return elemCode_array; }
01056 const domFx_code_profile_Array &getCode_array() const { return elemCode_array; }
01061 domFx_include_common_Array &getInclude_array() { return elemInclude_array; }
01066 const domFx_include_common_Array &getInclude_array() const { return elemInclude_array; }
01071 domImage_Array &getImage_array() { return elemImage_array; }
01076 const domImage_Array &getImage_array() const { return elemImage_array; }
01081 domGlsl_newparam_Array &getNewparam_array() { return elemNewparam_array; }
01086 const domGlsl_newparam_Array &getNewparam_array() const { return elemNewparam_array; }
01091 domTechnique_Array &getTechnique_array() { return elemTechnique_array; }
01096 const domTechnique_Array &getTechnique_array() const { return elemTechnique_array; }
01101 domExtra_Array &getExtra_array() { return elemExtra_array; }
01106 const domExtra_Array &getExtra_array() const { return elemExtra_array; }
01111 daeElementRefArray &getContents() { return _contents; }
01116 const daeElementRefArray &getContents() const { return _contents; }
01117
01118 protected:
01122 domProfile_GLSL(DAE& dae) : domFx_profile_abstract(dae), attrId(), elemAsset(), elemCode_array(), elemInclude_array(), elemImage_array(), elemNewparam_array(), elemTechnique_array(), elemExtra_array() {}
01126 virtual ~domProfile_GLSL() { daeElement::deleteCMDataArray(_CMData); }
01130 virtual domProfile_GLSL &operator=( const domProfile_GLSL &cpy ) { (void)cpy; return *this; }
01131
01132 public:
01137 static DLLSPEC daeElementRef create(DAE& dae);
01143 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
01144 };
01145
01146
01147 #endif