1 /* 2 * Copyright 2006 Sony Computer Entertainment Inc. 3 * 4 * Licensed under the MIT Open Source License, for details please see license.txt or the website 5 * http://www.opensource.org/licenses/mit-license.php 6 * 7 */ 8 9 #include <dae.h> 10 #include <dae/daeDom.h> 11 #include <1.4/dom/domFx_depthtarget_common.h> 12 #include <dae/daeMetaCMPolicy.h> 13 #include <dae/daeMetaSequence.h> 14 #include <dae/daeMetaChoice.h> 15 #include <dae/daeMetaGroup.h> 16 #include <dae/daeMetaAny.h> 17 #include <dae/daeMetaElementAttribute.h> 18 19 20 namespace ColladaDOM141 { 21 daeElementRef create(DAE & dae)22domFx_depthtarget_common::create(DAE& dae) 23 { 24 domFx_depthtarget_commonRef ref = new domFx_depthtarget_common(dae); 25 return ref; 26 } 27 28 29 daeMetaElement * registerElement(DAE & dae)30domFx_depthtarget_common::registerElement(DAE& dae) 31 { 32 daeMetaElement* meta = dae.getMeta(ID()); 33 if ( meta != NULL ) return meta; 34 35 meta = new daeMetaElement(dae); 36 dae.setMeta(ID(), *meta); 37 meta->setName( "fx_depthtarget_common" ); 38 meta->registerClass(domFx_depthtarget_common::create); 39 40 // Add attribute: _value 41 { 42 daeMetaAttribute *ma = new daeMetaAttribute; 43 ma->setName( "_value" ); 44 ma->setType( dae.getAtomicTypes().get("xsNCName")); 45 ma->setOffset( daeOffsetOf( domFx_depthtarget_common , _value )); 46 ma->setContainer( meta ); 47 meta->appendAttribute(ma); 48 } 49 50 // Add attribute: index 51 { 52 daeMetaAttribute *ma = new daeMetaAttribute; 53 ma->setName( "index" ); 54 ma->setType( dae.getAtomicTypes().get("xsNonNegativeInteger")); 55 ma->setOffset( daeOffsetOf( domFx_depthtarget_common , attrIndex )); 56 ma->setContainer( meta ); 57 ma->setDefaultString( "0"); 58 ma->setIsRequired( false ); 59 60 meta->appendAttribute(ma); 61 } 62 63 // Add attribute: face 64 { 65 daeMetaAttribute *ma = new daeMetaAttribute; 66 ma->setName( "face" ); 67 ma->setType( dae.getAtomicTypes().get("Fx_surface_face_enum")); 68 ma->setOffset( daeOffsetOf( domFx_depthtarget_common , attrFace )); 69 ma->setContainer( meta ); 70 ma->setDefaultString( "POSITIVE_X"); 71 ma->setIsRequired( false ); 72 73 meta->appendAttribute(ma); 74 } 75 76 // Add attribute: mip 77 { 78 daeMetaAttribute *ma = new daeMetaAttribute; 79 ma->setName( "mip" ); 80 ma->setType( dae.getAtomicTypes().get("xsNonNegativeInteger")); 81 ma->setOffset( daeOffsetOf( domFx_depthtarget_common , attrMip )); 82 ma->setContainer( meta ); 83 ma->setDefaultString( "0"); 84 ma->setIsRequired( false ); 85 86 meta->appendAttribute(ma); 87 } 88 89 // Add attribute: slice 90 { 91 daeMetaAttribute *ma = new daeMetaAttribute; 92 ma->setName( "slice" ); 93 ma->setType( dae.getAtomicTypes().get("xsNonNegativeInteger")); 94 ma->setOffset( daeOffsetOf( domFx_depthtarget_common , attrSlice )); 95 ma->setContainer( meta ); 96 ma->setDefaultString( "0"); 97 ma->setIsRequired( false ); 98 99 meta->appendAttribute(ma); 100 } 101 102 meta->setElementSize(sizeof(domFx_depthtarget_common)); 103 meta->validate(); 104 105 return meta; 106 } 107 108 } // ColladaDOM141 109