00001 #ifndef __domCg_pass_h__ 00002 #define __domCg_pass_h__ 00003 00004 #include <dae/daeDocument.h> 00005 #include <dom/domTypes.h> 00006 #include <dom/domElements.h> 00007 00008 #include <dom/domFx_annotate.h> 00009 #include <dom/domGl_pipeline_settings.h> 00010 #include <dom/domFx_sources.h> 00011 #include <dom/domFx_target.h> 00012 #include <dom/domCg_param.h> 00013 #include <dom/domFx_colortarget.h> 00014 #include <dom/domFx_depthtarget.h> 00015 #include <dom/domFx_stenciltarget.h> 00016 #include <dom/domFx_clearcolor.h> 00017 #include <dom/domFx_cleardepth.h> 00018 #include <dom/domFx_clearstencil.h> 00019 #include <dom/domExtra.h> 00020 class DAE; 00021 00022 class domCg_pass : public daeElement 00023 { 00024 public: 00025 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CG_PASS; } 00026 static daeInt ID() { return 249; } 00027 virtual daeInt typeID() const { return ID(); } 00028 public: 00029 class domStates; 00030 00031 typedef daeSmartRef<domStates> domStatesRef; 00032 typedef daeTArray<domStatesRef> domStates_Array; 00033 00034 class domStates : public daeElement 00035 { 00036 public: 00037 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::STATES; } 00038 static daeInt ID() { return 250; } 00039 virtual daeInt typeID() const { return ID(); } 00040 00041 protected: // Element 00042 domGl_pipeline_settings_Array elemGl_pipeline_settings_array; 00043 00044 public: //Accessors and Mutators 00049 domGl_pipeline_settings_Array &getGl_pipeline_settings_array() { return elemGl_pipeline_settings_array; } 00054 const domGl_pipeline_settings_Array &getGl_pipeline_settings_array() const { return elemGl_pipeline_settings_array; } 00055 protected: 00059 domStates(DAE& dae) : daeElement(dae), elemGl_pipeline_settings_array() {} 00063 virtual ~domStates() {} 00067 virtual domStates &operator=( const domStates &cpy ) { (void)cpy; return *this; } 00068 00069 public: // STATIC METHODS 00074 static DLLSPEC daeElementRef create(DAE& dae); 00080 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00081 }; 00082 00083 class domProgram; 00084 00085 typedef daeSmartRef<domProgram> domProgramRef; 00086 typedef daeTArray<domProgramRef> domProgram_Array; 00087 00088 class domProgram : public daeElement 00089 { 00090 public: 00091 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PROGRAM; } 00092 static daeInt ID() { return 251; } 00093 virtual daeInt typeID() const { return ID(); } 00094 public: 00095 class domShader; 00096 00097 typedef daeSmartRef<domShader> domShaderRef; 00098 typedef daeTArray<domShaderRef> domShader_Array; 00099 00104 class domShader : public daeElement 00105 { 00106 public: 00107 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SHADER; } 00108 static daeInt ID() { return 252; } 00109 virtual daeInt typeID() const { return ID(); } 00110 public: 00111 class domSources; 00112 00113 typedef daeSmartRef<domSources> domSourcesRef; 00114 typedef daeTArray<domSourcesRef> domSources_Array; 00115 00120 class domSources : public domFx_sources 00121 { 00122 public: 00123 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SOURCES; } 00124 static daeInt ID() { return 253; } 00125 virtual daeInt typeID() const { return ID(); } 00126 protected: // Attribute 00130 xsToken attrEntry; 00131 00132 00133 public: //Accessors and Mutators 00138 xsToken getEntry() const { return attrEntry; } 00143 void setEntry( xsToken atEntry ) { *(daeStringRef*)&attrEntry = atEntry; _validAttributeArray[0] = true; } 00144 00145 protected: 00149 domSources(DAE& dae) : domFx_sources(dae), attrEntry() {} 00153 virtual ~domSources() {} 00157 virtual domSources &operator=( const domSources &cpy ) { (void)cpy; return *this; } 00158 00159 public: // STATIC METHODS 00164 static DLLSPEC daeElementRef create(DAE& dae); 00170 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00171 }; 00172 00173 class domBind_uniform; 00174 00175 typedef daeSmartRef<domBind_uniform> domBind_uniformRef; 00176 typedef daeTArray<domBind_uniformRef> domBind_uniform_Array; 00177 00181 class domBind_uniform : public daeElement 00182 { 00183 public: 00184 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::BIND_UNIFORM; } 00185 static daeInt ID() { return 254; } 00186 virtual daeInt typeID() const { return ID(); } 00187 public: 00188 class domParam; 00189 00190 typedef daeSmartRef<domParam> domParamRef; 00191 typedef daeTArray<domParamRef> domParam_Array; 00192 00196 class domParam : public daeElement 00197 { 00198 public: 00199 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PARAM; } 00200 static daeInt ID() { return 255; } 00201 virtual daeInt typeID() const { return ID(); } 00202 protected: // Attribute 00203 xsNCName attrRef; 00204 00205 00206 public: //Accessors and Mutators 00211 xsNCName getRef() const { return attrRef; } 00216 void setRef( xsNCName atRef ) { *(daeStringRef*)&attrRef = atRef; _validAttributeArray[0] = true; } 00217 00218 protected: 00222 domParam(DAE& dae) : daeElement(dae), attrRef() {} 00226 virtual ~domParam() {} 00230 virtual domParam &operator=( const domParam &cpy ) { (void)cpy; return *this; } 00231 00232 public: // STATIC METHODS 00237 static DLLSPEC daeElementRef create(DAE& dae); 00243 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00244 }; 00245 00246 00247 protected: // Attribute 00252 xsNCName attrSymbol; 00253 00254 protected: // Elements 00259 domParamRef elemParam; 00260 domCg_paramRef elemCg_param; 00264 daeElementRefArray _contents; 00268 daeUIntArray _contentsOrder; 00269 00273 daeTArray< daeCharArray * > _CMData; 00274 00275 00276 public: //Accessors and Mutators 00281 xsNCName getSymbol() const { return attrSymbol; } 00286 void setSymbol( xsNCName atSymbol ) { *(daeStringRef*)&attrSymbol = atSymbol; _validAttributeArray[0] = true; } 00287 00292 const domParamRef getParam() const { return elemParam; } 00297 const domCg_paramRef getCg_param() const { return elemCg_param; } 00302 daeElementRefArray &getContents() { return _contents; } 00307 const daeElementRefArray &getContents() const { return _contents; } 00308 00309 protected: 00313 domBind_uniform(DAE& dae) : daeElement(dae), attrSymbol(), elemParam(), elemCg_param() {} 00317 virtual ~domBind_uniform() { daeElement::deleteCMDataArray(_CMData); } 00321 virtual domBind_uniform &operator=( const domBind_uniform &cpy ) { (void)cpy; return *this; } 00322 00323 public: // STATIC METHODS 00328 static DLLSPEC daeElementRef create(DAE& dae); 00334 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00335 }; 00336 00337 00338 protected: // Attribute 00343 domFx_pipeline_stage attrStage; 00344 00345 protected: // Elements 00350 domSourcesRef elemSources; 00351 domFx_target_Array elemCompiler_array; 00355 domBind_uniform_Array elemBind_uniform_array; 00356 00357 public: //Accessors and Mutators 00362 domFx_pipeline_stage getStage() const { return attrStage; } 00367 void setStage( domFx_pipeline_stage atStage ) { attrStage = atStage; _validAttributeArray[0] = true; } 00368 00373 const domSourcesRef getSources() const { return elemSources; } 00378 domFx_target_Array &getCompiler_array() { return elemCompiler_array; } 00383 const domFx_target_Array &getCompiler_array() const { return elemCompiler_array; } 00388 domBind_uniform_Array &getBind_uniform_array() { return elemBind_uniform_array; } 00393 const domBind_uniform_Array &getBind_uniform_array() const { return elemBind_uniform_array; } 00394 protected: 00398 domShader(DAE& dae) : daeElement(dae), attrStage(), elemSources(), elemCompiler_array(), elemBind_uniform_array() {} 00402 virtual ~domShader() {} 00406 virtual domShader &operator=( const domShader &cpy ) { (void)cpy; return *this; } 00407 00408 public: // STATIC METHODS 00413 static DLLSPEC daeElementRef create(DAE& dae); 00419 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00420 }; 00421 00422 00423 00424 protected: // Element 00429 domShader_Array elemShader_array; 00430 00431 public: //Accessors and Mutators 00436 domShader_Array &getShader_array() { return elemShader_array; } 00441 const domShader_Array &getShader_array() const { return elemShader_array; } 00442 protected: 00446 domProgram(DAE& dae) : daeElement(dae), elemShader_array() {} 00450 virtual ~domProgram() {} 00454 virtual domProgram &operator=( const domProgram &cpy ) { (void)cpy; return *this; } 00455 00456 public: // STATIC METHODS 00461 static DLLSPEC daeElementRef create(DAE& dae); 00467 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00468 }; 00469 00470 class domEvaluate; 00471 00472 typedef daeSmartRef<domEvaluate> domEvaluateRef; 00473 typedef daeTArray<domEvaluateRef> domEvaluate_Array; 00474 00475 class domEvaluate : public daeElement 00476 { 00477 public: 00478 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::EVALUATE; } 00479 static daeInt ID() { return 256; } 00480 virtual daeInt typeID() const { return ID(); } 00481 public: 00482 class domDraw; 00483 00484 typedef daeSmartRef<domDraw> domDrawRef; 00485 typedef daeTArray<domDrawRef> domDraw_Array; 00486 00487 class domDraw : public daeElement 00488 { 00489 public: 00490 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::DRAW; } 00491 static daeInt ID() { return 257; } 00492 virtual daeInt typeID() const { return ID(); } 00493 00494 00495 public: //Accessors and Mutators 00500 domFx_draw& getValue() { return _value; } 00505 void setValue( const domFx_draw& val ) { _value = val; } 00506 00507 protected: // Value 00511 domFx_draw _value; 00512 protected: 00516 domDraw(DAE& dae) : daeElement(dae), _value() {} 00520 virtual ~domDraw() {} 00524 virtual domDraw &operator=( const domDraw &cpy ) { (void)cpy; return *this; } 00525 00526 public: // STATIC METHODS 00531 static DLLSPEC daeElementRef create(DAE& dae); 00537 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00538 }; 00539 00540 00541 00542 protected: // Elements 00543 domFx_colortarget_Array elemColor_target_array; 00544 domFx_depthtarget_Array elemDepth_target_array; 00545 domFx_stenciltarget_Array elemStencil_target_array; 00546 domFx_clearcolor_Array elemColor_clear_array; 00547 domFx_cleardepth_Array elemDepth_clear_array; 00548 domFx_clearstencil_Array elemStencil_clear_array; 00549 domDrawRef elemDraw; 00550 00551 public: //Accessors and Mutators 00556 domFx_colortarget_Array &getColor_target_array() { return elemColor_target_array; } 00561 const domFx_colortarget_Array &getColor_target_array() const { return elemColor_target_array; } 00566 domFx_depthtarget_Array &getDepth_target_array() { return elemDepth_target_array; } 00571 const domFx_depthtarget_Array &getDepth_target_array() const { return elemDepth_target_array; } 00576 domFx_stenciltarget_Array &getStencil_target_array() { return elemStencil_target_array; } 00581 const domFx_stenciltarget_Array &getStencil_target_array() const { return elemStencil_target_array; } 00586 domFx_clearcolor_Array &getColor_clear_array() { return elemColor_clear_array; } 00591 const domFx_clearcolor_Array &getColor_clear_array() const { return elemColor_clear_array; } 00596 domFx_cleardepth_Array &getDepth_clear_array() { return elemDepth_clear_array; } 00601 const domFx_cleardepth_Array &getDepth_clear_array() const { return elemDepth_clear_array; } 00606 domFx_clearstencil_Array &getStencil_clear_array() { return elemStencil_clear_array; } 00611 const domFx_clearstencil_Array &getStencil_clear_array() const { return elemStencil_clear_array; } 00616 const domDrawRef getDraw() const { return elemDraw; } 00617 protected: 00621 domEvaluate(DAE& dae) : daeElement(dae), elemColor_target_array(), elemDepth_target_array(), elemStencil_target_array(), elemColor_clear_array(), elemDepth_clear_array(), elemStencil_clear_array(), elemDraw() {} 00625 virtual ~domEvaluate() {} 00629 virtual domEvaluate &operator=( const domEvaluate &cpy ) { (void)cpy; return *this; } 00630 00631 public: // STATIC METHODS 00636 static DLLSPEC daeElementRef create(DAE& dae); 00642 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00643 }; 00644 00645 00646 protected: // Attribute 00652 domSid attrSid; 00653 00654 protected: // Elements 00655 domFx_annotate_Array elemAnnotate_array; 00656 domStatesRef elemStates; 00657 domProgramRef elemProgram; 00658 domEvaluateRef elemEvaluate; 00659 domExtra_Array elemExtra_array; 00660 00661 public: //Accessors and Mutators 00666 domSid getSid() const { return attrSid; } 00671 void setSid( domSid atSid ) { *(daeStringRef*)&attrSid = atSid;} 00672 00677 domFx_annotate_Array &getAnnotate_array() { return elemAnnotate_array; } 00682 const domFx_annotate_Array &getAnnotate_array() const { return elemAnnotate_array; } 00687 const domStatesRef getStates() const { return elemStates; } 00692 const domProgramRef getProgram() const { return elemProgram; } 00697 const domEvaluateRef getEvaluate() const { return elemEvaluate; } 00702 domExtra_Array &getExtra_array() { return elemExtra_array; } 00707 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00708 protected: 00712 domCg_pass(DAE& dae) : daeElement(dae), attrSid(), elemAnnotate_array(), elemStates(), elemProgram(), elemEvaluate(), elemExtra_array() {} 00716 virtual ~domCg_pass() {} 00720 virtual domCg_pass &operator=( const domCg_pass &cpy ) { (void)cpy; return *this; } 00721 00722 public: // STATIC METHODS 00727 static DLLSPEC daeElementRef create(DAE& dae); 00733 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00734 }; 00735 00736 00737 #endif