Home | History | Annotate | Download | only in dom
      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 <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 daeElementRef
     20 domFx_depthtarget_common::create(DAE& dae)
     21 {
     22 	domFx_depthtarget_commonRef ref = new domFx_depthtarget_common(dae);
     23 	return ref;
     24 }
     25 
     26 
     27 daeMetaElement *
     28 domFx_depthtarget_common::registerElement(DAE& dae)
     29 {
     30 	daeMetaElement* meta = dae.getMeta(ID());
     31 	if ( meta != NULL ) return meta;
     32 
     33 	meta = new daeMetaElement(dae);
     34 	dae.setMeta(ID(), *meta);
     35 	meta->setName( "fx_depthtarget_common" );
     36 	meta->registerClass(domFx_depthtarget_common::create);
     37 
     38 	//	Add attribute: _value
     39 	{
     40 		daeMetaAttribute *ma = new daeMetaAttribute;
     41 		ma->setName( "_value" );
     42 		ma->setType( dae.getAtomicTypes().get("xsNCName"));
     43 		ma->setOffset( daeOffsetOf( domFx_depthtarget_common , _value ));
     44 		ma->setContainer( meta );
     45 		meta->appendAttribute(ma);
     46 	}
     47 
     48 	//	Add attribute: index
     49 	{
     50 		daeMetaAttribute *ma = new daeMetaAttribute;
     51 		ma->setName( "index" );
     52 		ma->setType( dae.getAtomicTypes().get("xsNonNegativeInteger"));
     53 		ma->setOffset( daeOffsetOf( domFx_depthtarget_common , attrIndex ));
     54 		ma->setContainer( meta );
     55 		ma->setDefaultString( "0");
     56 		ma->setIsRequired( false );
     57 
     58 		meta->appendAttribute(ma);
     59 	}
     60 
     61 	//	Add attribute: face
     62 	{
     63 		daeMetaAttribute *ma = new daeMetaAttribute;
     64 		ma->setName( "face" );
     65 		ma->setType( dae.getAtomicTypes().get("Fx_surface_face_enum"));
     66 		ma->setOffset( daeOffsetOf( domFx_depthtarget_common , attrFace ));
     67 		ma->setContainer( meta );
     68 		ma->setDefaultString( "POSITIVE_X");
     69 		ma->setIsRequired( false );
     70 
     71 		meta->appendAttribute(ma);
     72 	}
     73 
     74 	//	Add attribute: mip
     75 	{
     76 		daeMetaAttribute *ma = new daeMetaAttribute;
     77 		ma->setName( "mip" );
     78 		ma->setType( dae.getAtomicTypes().get("xsNonNegativeInteger"));
     79 		ma->setOffset( daeOffsetOf( domFx_depthtarget_common , attrMip ));
     80 		ma->setContainer( meta );
     81 		ma->setDefaultString( "0");
     82 		ma->setIsRequired( false );
     83 
     84 		meta->appendAttribute(ma);
     85 	}
     86 
     87 	//	Add attribute: slice
     88 	{
     89 		daeMetaAttribute *ma = new daeMetaAttribute;
     90 		ma->setName( "slice" );
     91 		ma->setType( dae.getAtomicTypes().get("xsNonNegativeInteger"));
     92 		ma->setOffset( daeOffsetOf( domFx_depthtarget_common , attrSlice ));
     93 		ma->setContainer( meta );
     94 		ma->setDefaultString( "0");
     95 		ma->setIsRequired( false );
     96 
     97 		meta->appendAttribute(ma);
     98 	}
     99 
    100 	meta->setElementSize(sizeof(domFx_depthtarget_common));
    101 	meta->validate();
    102 
    103 	return meta;
    104 }
    105 
    106