Exemple #1
0
daeMetaElement *
domMesh::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "mesh" );
	meta->registerClass(domMesh::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, -1 );
	mea->setName( "source" );
	mea->setOffset( daeOffsetOf(domMesh,elemSource_array) );
	mea->setElementType( domSource::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 1, 1, 1 );
	mea->setName( "vertices" );
	mea->setOffset( daeOffsetOf(domMesh,elemVertices) );
	mea->setElementType( domVertices::registerElement(dae) );
	cm->appendChild( mea );

	cm = new daeMetaChoice( meta, cm, 0, 2, 0, -1 );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "lines" );
	mea->setOffset( daeOffsetOf(domMesh,elemLines_array) );
	mea->setElementType( domLines::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "linestrips" );
	mea->setOffset( daeOffsetOf(domMesh,elemLinestrips_array) );
	mea->setElementType( domLinestrips::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "polygons" );
	mea->setOffset( daeOffsetOf(domMesh,elemPolygons_array) );
	mea->setElementType( domPolygons::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "polylist" );
	mea->setOffset( daeOffsetOf(domMesh,elemPolylist_array) );
	mea->setElementType( domPolylist::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "triangles" );
	mea->setOffset( daeOffsetOf(domMesh,elemTriangles_array) );
	mea->setElementType( domTriangles::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "trifans" );
	mea->setOffset( daeOffsetOf(domMesh,elemTrifans_array) );
	mea->setElementType( domTrifans::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "tristrips" );
	mea->setOffset( daeOffsetOf(domMesh,elemTristrips_array) );
	mea->setElementType( domTristrips::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 0 );
	cm->getParent()->appendChild( cm );
	cm = cm->getParent();

	mea = new daeMetaElementArrayAttribute( meta, cm, 3003, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domMesh,elemExtra_array) );
	mea->setElementType( domExtra::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 3003 );
	meta->setCMRoot( cm );	
	// Ordered list of sub-elements
	meta->addContents(daeOffsetOf(domMesh,_contents));
	meta->addContentsOrder(daeOffsetOf(domMesh,_contentsOrder));

	meta->addCMDataArray(daeOffsetOf(domMesh,_CMData), 1);
	meta->setElementSize(sizeof(domMesh));
	meta->validate();

	return meta;
}
Exemple #2
0
daeMetaElement *
domFx_setparam::registerElement(DAE& dae)
{
    daeMetaElement* meta = dae.getMeta(ID());
    if ( meta != NULL ) return meta;

    meta = new daeMetaElement(dae);
    dae.setMeta(ID(), *meta);
    meta->setName( "fx_setparam" );
    meta->registerClass(domFx_setparam::create);

    meta->setIsTransparent( true );
    daeMetaCMPolicy *cm = NULL;
    daeMetaElementAttribute *mea = NULL;
    cm = new daeMetaChoice( meta, cm, 0, 0, 1, 1 );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "bool" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemBool) );
    mea->setElementType( domFx_setparam::domBool::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "bool2" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemBool2) );
    mea->setElementType( domFx_setparam::domBool2::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "bool3" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemBool3) );
    mea->setElementType( domFx_setparam::domBool3::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "bool4" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemBool4) );
    mea->setElementType( domFx_setparam::domBool4::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "int" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemInt) );
    mea->setElementType( domFx_setparam::domInt::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "int2" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemInt2) );
    mea->setElementType( domFx_setparam::domInt2::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "int3" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemInt3) );
    mea->setElementType( domFx_setparam::domInt3::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "int4" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemInt4) );
    mea->setElementType( domFx_setparam::domInt4::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat) );
    mea->setElementType( domFx_setparam::domFloat::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float2" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat2) );
    mea->setElementType( domFx_setparam::domFloat2::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float3" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat3) );
    mea->setElementType( domFx_setparam::domFloat3::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float4" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat4) );
    mea->setElementType( domFx_setparam::domFloat4::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float2x1" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat2x1) );
    mea->setElementType( domFx_setparam::domFloat2x1::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float2x2" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat2x2) );
    mea->setElementType( domFx_setparam::domFloat2x2::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float2x3" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat2x3) );
    mea->setElementType( domFx_setparam::domFloat2x3::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float2x4" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat2x4) );
    mea->setElementType( domFx_setparam::domFloat2x4::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float3x1" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat3x1) );
    mea->setElementType( domFx_setparam::domFloat3x1::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float3x2" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat3x2) );
    mea->setElementType( domFx_setparam::domFloat3x2::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float3x3" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat3x3) );
    mea->setElementType( domFx_setparam::domFloat3x3::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float3x4" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat3x4) );
    mea->setElementType( domFx_setparam::domFloat3x4::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float4x1" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat4x1) );
    mea->setElementType( domFx_setparam::domFloat4x1::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float4x2" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat4x2) );
    mea->setElementType( domFx_setparam::domFloat4x2::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float4x3" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat4x3) );
    mea->setElementType( domFx_setparam::domFloat4x3::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "float4x4" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemFloat4x4) );
    mea->setElementType( domFx_setparam::domFloat4x4::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "enum" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemEnum) );
    mea->setElementType( domFx_setparam::domEnum::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "sampler_image" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemSampler_image) );
    mea->setElementType( domInstance_image::registerElement(dae) );
    cm->appendChild( mea );

    mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
    mea->setName( "sampler_states" );
    mea->setOffset( daeOffsetOf(domFx_setparam,elemSampler_states) );
    mea->setElementType( domFx_setparam::domSampler_states::registerElement(dae) );
    cm->appendChild( mea );

    cm->setMaxOrdinal( 0 );
    meta->setCMRoot( cm );
    // Ordered list of sub-elements
    meta->addContents(daeOffsetOf(domFx_setparam,_contents));
    meta->addContentsOrder(daeOffsetOf(domFx_setparam,_contentsOrder));

    meta->addCMDataArray(daeOffsetOf(domFx_setparam,_CMData), 1);
    meta->setElementSize(sizeof(domFx_setparam));
    meta->validate();

    return meta;
}
Exemple #3
0
daeMetaElement *
domRigid_body::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "rigid_body" );
	meta->registerClass(domRigid_body::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "technique_common" );
	mea->setOffset( daeOffsetOf(domRigid_body,elemTechnique_common) );
	mea->setElementType( domRigid_body::domTechnique_common::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 1, 0, -1 );
	mea->setName( "technique" );
	mea->setOffset( daeOffsetOf(domRigid_body,elemTechnique_array) );
	mea->setElementType( domTechnique::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 2, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domRigid_body,elemExtra_array) );
	mea->setElementType( domExtra::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 2 );
	meta->setCMRoot( cm );	

	//	Add attribute: sid
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "sid" );
		ma->setType( dae.getAtomicTypes().get("xsNCName"));
		ma->setOffset( daeOffsetOf( domRigid_body , attrSid ));
		ma->setContainer( meta );
		ma->setIsRequired( true );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: name
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "name" );
		ma->setType( dae.getAtomicTypes().get("xsNCName"));
		ma->setOffset( daeOffsetOf( domRigid_body , attrName ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	meta->setElementSize(sizeof(domRigid_body));
	meta->validate();

	return meta;
}
daeMetaElement *
domLibrary_animations::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "library_animations" );
	meta->registerClass(domLibrary_animations::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 0, 1 );
	mea->setName( "asset" );
	mea->setOffset( daeOffsetOf(domLibrary_animations,elemAsset) );
	mea->setElementType( domAsset::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 1, 1, -1 );
	mea->setName( "animation" );
	mea->setOffset( daeOffsetOf(domLibrary_animations,elemAnimation_array) );
	mea->setElementType( domAnimation::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 2, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domLibrary_animations,elemExtra_array) );
	mea->setElementType( domExtra::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 2 );
	meta->setCMRoot( cm );	

	//	Add attribute: id
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "id" );
		ma->setType( dae.getAtomicTypes().get("xsID"));
		ma->setOffset( daeOffsetOf( domLibrary_animations , attrId ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: name
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "name" );
		ma->setType( dae.getAtomicTypes().get("xsNCName"));
		ma->setOffset( daeOffsetOf( domLibrary_animations , attrName ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	meta->setElementSize(sizeof(domLibrary_animations));
	meta->validate();

	return meta;
}
daeMetaElement *
domCOLLADA::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "COLLADA" );
	meta->registerClass(domCOLLADA::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "asset" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemAsset) );
	mea->setElementType( domAsset::registerElement(dae) );
	cm->appendChild( mea );

	cm = new daeMetaChoice( meta, cm, 0, 1, 0, -1 );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_animations" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_animations_array) );
	mea->setElementType( domLibrary_animations::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_animation_clips" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_animation_clips_array) );
	mea->setElementType( domLibrary_animation_clips::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_cameras" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_cameras_array) );
	mea->setElementType( domLibrary_cameras::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_controllers" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_controllers_array) );
	mea->setElementType( domLibrary_controllers::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_geometries" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_geometries_array) );
	mea->setElementType( domLibrary_geometries::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_effects" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_effects_array) );
	mea->setElementType( domLibrary_effects::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_force_fields" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_force_fields_array) );
	mea->setElementType( domLibrary_force_fields::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_images" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_images_array) );
	mea->setElementType( domLibrary_images::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_lights" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_lights_array) );
	mea->setElementType( domLibrary_lights::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_materials" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_materials_array) );
	mea->setElementType( domLibrary_materials::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_nodes" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_nodes_array) );
	mea->setElementType( domLibrary_nodes::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_physics_materials" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_physics_materials_array) );
	mea->setElementType( domLibrary_physics_materials::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_physics_models" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_physics_models_array) );
	mea->setElementType( domLibrary_physics_models::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_physics_scenes" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_physics_scenes_array) );
	mea->setElementType( domLibrary_physics_scenes::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_visual_scenes" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_visual_scenes_array) );
	mea->setElementType( domLibrary_visual_scenes::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_joints" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_joints_array) );
	mea->setElementType( domLibrary_joints::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_kinematics_models" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_kinematics_models_array) );
	mea->setElementType( domLibrary_kinematics_models::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_articulated_systems" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_articulated_systems_array) );
	mea->setElementType( domLibrary_articulated_systems::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_kinematics_scenes" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_kinematics_scenes_array) );
	mea->setElementType( domLibrary_kinematics_scenes::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "library_formulas" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemLibrary_formulas_array) );
	mea->setElementType( domLibrary_formulas::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 0 );
	cm->getParent()->appendChild( cm );
	cm = cm->getParent();

	mea = new daeMetaElementAttribute( meta, cm, 3002, 0, 1 );
	mea->setName( "scene" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemScene) );
	mea->setElementType( domCOLLADA::domScene::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 3003, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domCOLLADA,elemExtra_array) );
	mea->setElementType( domExtra::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 3003 );
	meta->setCMRoot( cm );	
	// Ordered list of sub-elements
	meta->addContents(daeOffsetOf(domCOLLADA,_contents));
	meta->addContentsOrder(daeOffsetOf(domCOLLADA,_contentsOrder));

	meta->addCMDataArray(daeOffsetOf(domCOLLADA,_CMData), 1);	//	Add attribute: xmlns
	{
		daeMetaAttribute* ma = new daeMetaAttribute;
		ma->setName( "xmlns" );
		ma->setType( dae.getAtomicTypes().get("xsAnyURI"));
		ma->setOffset( daeOffsetOf( domCOLLADA , attrXmlns ));
		ma->setContainer( meta );
		//ma->setIsRequired( true );
		meta->appendAttribute(ma);
	}
    
	//	Add attribute: version
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "version" );
		ma->setType( dae.getAtomicTypes().get("Version"));
		ma->setOffset( daeOffsetOf( domCOLLADA , attrVersion ));
		ma->setContainer( meta );
		ma->setIsRequired( true );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: xml_base
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "xml_base" );
		ma->setType( dae.getAtomicTypes().get("xsAnyURI"));
		ma->setOffset( daeOffsetOf( domCOLLADA , attrXml_base ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	meta->setElementSize(sizeof(domCOLLADA));
	meta->validate();

	return meta;
}
daeMetaElement *
domInstance_camera::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "instance_camera" );
	meta->registerClass(domInstance_camera::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domInstance_camera,elemExtra_array) );
	mea->setElementType( domExtra::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 0 );
	meta->setCMRoot( cm );	

	//	Add attribute: url
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "url" );
		ma->setType( dae.getAtomicTypes().get("xsAnyURI"));
		ma->setOffset( daeOffsetOf( domInstance_camera , attrUrl ));
		ma->setContainer( meta );
		ma->setIsRequired( true );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: sid
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "sid" );
		ma->setType( dae.getAtomicTypes().get("xsNCName"));
		ma->setOffset( daeOffsetOf( domInstance_camera , attrSid ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: name
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "name" );
		ma->setType( dae.getAtomicTypes().get("xsNCName"));
		ma->setOffset( daeOffsetOf( domInstance_camera , attrName ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	meta->setElementSize(sizeof(domInstance_camera));
	meta->validate();

	return meta;
}
Exemple #7
0
daeMetaElement *
domFx_surface_common::registerElement()
{
    if ( _Meta != NULL ) return _Meta;
    
    _Meta = new daeMetaElement;
    _Meta->setName( "fx_surface_common" );
	_Meta->registerConstructor(domFx_surface_common::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( _Meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( _Meta, cm, 0, 0, 1 );
	mea->setName( "fx_surface_init_common" );
	mea->setOffset( daeOffsetOf(domFx_surface_common,elemFx_surface_init_common) );
	mea->setElementType( domFx_surface_init_common::registerElement() );
	cm->appendChild( new daeMetaGroup( mea, _Meta, cm, 0, 0, 1 ) );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 1, 0, 1 );
	mea->setName( "format" );
	mea->setOffset( daeOffsetOf(domFx_surface_common,elemFormat) );
	mea->setElementType( domFx_surface_common::domFormat::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 2, 0, 1 );
	mea->setName( "format_hint" );
	mea->setOffset( daeOffsetOf(domFx_surface_common,elemFormat_hint) );
	mea->setElementType( domFx_surface_format_hint_common::registerElement() );
	cm->appendChild( mea );
	
	cm = new daeMetaChoice( _Meta, cm, 3, 0, 1 );

	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "size" );
	mea->setOffset( daeOffsetOf(domFx_surface_common,elemSize) );
	mea->setElementType( domFx_surface_common::domSize::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "viewport_ratio" );
	mea->setOffset( daeOffsetOf(domFx_surface_common,elemViewport_ratio) );
	mea->setElementType( domFx_surface_common::domViewport_ratio::registerElement() );
	cm->appendChild( mea );
	
	cm->setMaxOrdinal( 0 );
	cm->getParent()->appendChild( cm );
	cm = cm->getParent();
	
	mea = new daeMetaElementAttribute( _Meta, cm, 4, 0, 1 );
	mea->setName( "mip_levels" );
	mea->setOffset( daeOffsetOf(domFx_surface_common,elemMip_levels) );
	mea->setElementType( domFx_surface_common::domMip_levels::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 5, 0, 1 );
	mea->setName( "mipmap_generate" );
	mea->setOffset( daeOffsetOf(domFx_surface_common,elemMipmap_generate) );
	mea->setElementType( domFx_surface_common::domMipmap_generate::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementArrayAttribute( _Meta, cm, 6, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domFx_surface_common,elemExtra_array) );
	mea->setElementType( domExtra::registerElement() );
	cm->appendChild( mea );
	
	cm->setMaxOrdinal( 6 );
	_Meta->setCMRoot( cm );	
	// Ordered list of sub-elements
    _Meta->addContents(daeOffsetOf(domFx_surface_common,_contents));
    _Meta->addContentsOrder(daeOffsetOf(domFx_surface_common,_contentsOrder));


	//	Add attribute: type
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "type" );
		ma->setType( daeAtomicType::get("Fx_surface_type_enum"));
		ma->setOffset( daeOffsetOf( domFx_surface_common , attrType ));
		ma->setContainer( _Meta );
		ma->setIsRequired( true );
	
		_Meta->appendAttribute(ma);
	}
	
	
	_Meta->setElementSize(sizeof(domFx_surface_common));
	_Meta->validate();

	return _Meta;
}
daeMetaElement *
domPolygons::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "polygons" );
	meta->registerClass(domPolygons::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 0, -1 );
	mea->setName( "input" );
	mea->setOffset( daeOffsetOf(domPolygons,elemInput_array) );
	mea->setElementType( domInputLocalOffset::registerElement(dae) );
	cm->appendChild( mea );

	cm = new daeMetaChoice( meta, cm, 0, 1, 0, -1 );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "p" );
	mea->setOffset( daeOffsetOf(domPolygons,elemP_array) );
	mea->setElementType( domP::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "ph" );
	mea->setOffset( daeOffsetOf(domPolygons,elemPh_array) );
	mea->setElementType( domPolygons::domPh::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 0 );
	cm->getParent()->appendChild( cm );
	cm = cm->getParent();

	mea = new daeMetaElementArrayAttribute( meta, cm, 3002, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domPolygons,elemExtra_array) );
	mea->setElementType( domExtra::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 3002 );
	meta->setCMRoot( cm );	
	// Ordered list of sub-elements
	meta->addContents(daeOffsetOf(domPolygons,_contents));
	meta->addContentsOrder(daeOffsetOf(domPolygons,_contentsOrder));

	meta->addCMDataArray(daeOffsetOf(domPolygons,_CMData), 1);
	//	Add attribute: name
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "name" );
		ma->setType( dae.getAtomicTypes().get("xsNCName"));
		ma->setOffset( daeOffsetOf( domPolygons , attrName ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: count
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "count" );
		ma->setType( dae.getAtomicTypes().get("Uint"));
		ma->setOffset( daeOffsetOf( domPolygons , attrCount ));
		ma->setContainer( meta );
		ma->setIsRequired( true );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: material
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "material" );
		ma->setType( dae.getAtomicTypes().get("xsNCName"));
		ma->setOffset( daeOffsetOf( domPolygons , attrMaterial ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	meta->setElementSize(sizeof(domPolygons));
	meta->validate();

	return meta;
}
Exemple #9
0
daeMetaElement *
domCommon_newparam_type::registerElement()
{
    if ( _Meta != NULL ) return _Meta;
    
    _Meta = new daeMetaElement;
    _Meta->setName( "common_newparam_type" );
	_Meta->registerConstructor(domCommon_newparam_type::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( _Meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( _Meta, cm, 0, 0, 1 );
	mea->setName( "semantic" );
	mea->setOffset( daeOffsetOf(domCommon_newparam_type,elemSemantic) );
	mea->setElementType( domCommon_newparam_type::domSemantic::registerElement() );
	cm->appendChild( mea );
	
	cm = new daeMetaChoice( _Meta, cm, 1, 1, 1 );

	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "float" );
	mea->setOffset( daeOffsetOf(domCommon_newparam_type,elemFloat) );
	mea->setElementType( domCommon_newparam_type::domFloat::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "float2" );
	mea->setOffset( daeOffsetOf(domCommon_newparam_type,elemFloat2) );
	mea->setElementType( domCommon_newparam_type::domFloat2::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "float3" );
	mea->setOffset( daeOffsetOf(domCommon_newparam_type,elemFloat3) );
	mea->setElementType( domCommon_newparam_type::domFloat3::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "float4" );
	mea->setOffset( daeOffsetOf(domCommon_newparam_type,elemFloat4) );
	mea->setElementType( domCommon_newparam_type::domFloat4::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "surface" );
	mea->setOffset( daeOffsetOf(domCommon_newparam_type,elemSurface) );
	mea->setElementType( domFx_surface_common::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "sampler2D" );
	mea->setOffset( daeOffsetOf(domCommon_newparam_type,elemSampler2D) );
	mea->setElementType( domFx_sampler2D_common::registerElement() );
	cm->appendChild( mea );
	
	cm->setMaxOrdinal( 0 );
	cm->getParent()->appendChild( cm );
	cm = cm->getParent();
	
	cm->setMaxOrdinal( 1 );
	_Meta->setCMRoot( cm );	
	// Ordered list of sub-elements
    _Meta->addContents(daeOffsetOf(domCommon_newparam_type,_contents));
    _Meta->addContentsOrder(daeOffsetOf(domCommon_newparam_type,_contentsOrder));


	//	Add attribute: sid
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "sid" );
		ma->setType( daeAtomicType::get("xsNCName"));
		ma->setOffset( daeOffsetOf( domCommon_newparam_type , attrSid ));
		ma->setContainer( _Meta );
		ma->setIsRequired( true );
	
		_Meta->appendAttribute(ma);
	}
	
	
	_Meta->setElementSize(sizeof(domCommon_newparam_type));
	_Meta->validate();

	return _Meta;
}
Exemple #10
0
daeMetaElement *
domPhysics_scene::registerElement()
{
    if ( _Meta != NULL ) return _Meta;
    
    _Meta = new daeMetaElement;
    _Meta->setName( "physics_scene" );
	_Meta->registerClass(domPhysics_scene::create, &_Meta);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( _Meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( _Meta, cm, 0, 0, 1 );
	mea->setName( "asset" );
	mea->setOffset( daeOffsetOf(domPhysics_scene,elemAsset) );
	mea->setElementType( domAsset::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementArrayAttribute( _Meta, cm, 1, 0, -1 );
	mea->setName( "instance_force_field" );
	mea->setOffset( daeOffsetOf(domPhysics_scene,elemInstance_force_field_array) );
	mea->setElementType( domInstance_force_field::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementArrayAttribute( _Meta, cm, 2, 0, -1 );
	mea->setName( "instance_physics_model" );
	mea->setOffset( daeOffsetOf(domPhysics_scene,elemInstance_physics_model_array) );
	mea->setElementType( domInstance_physics_model::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 3, 1, 1 );
	mea->setName( "technique_common" );
	mea->setOffset( daeOffsetOf(domPhysics_scene,elemTechnique_common) );
	mea->setElementType( domPhysics_scene::domTechnique_common::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementArrayAttribute( _Meta, cm, 4, 0, -1 );
	mea->setName( "technique" );
	mea->setOffset( daeOffsetOf(domPhysics_scene,elemTechnique_array) );
	mea->setElementType( domTechnique::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementArrayAttribute( _Meta, cm, 5, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domPhysics_scene,elemExtra_array) );
	mea->setElementType( domExtra::registerElement() );
	cm->appendChild( mea );
	
	cm->setMaxOrdinal( 5 );
	_Meta->setCMRoot( cm );	

	//	Add attribute: id
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "id" );
		ma->setType( daeAtomicType::get("xsID"));
		ma->setOffset( daeOffsetOf( domPhysics_scene , attrId ));
		ma->setContainer( _Meta );
	
		_Meta->appendAttribute(ma);
	}

	//	Add attribute: name
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "name" );
		ma->setType( daeAtomicType::get("xsNCName"));
		ma->setOffset( daeOffsetOf( domPhysics_scene , attrName ));
		ma->setContainer( _Meta );
	
		_Meta->appendAttribute(ma);
	}
	
	
	_Meta->setElementSize(sizeof(domPhysics_scene));
	_Meta->validate();

	return _Meta;
}
Exemple #11
0
daeMetaElement *
domFx_samplerCUBE_common::registerElement()
{
    if ( _Meta != NULL ) return _Meta;
    
    _Meta = new daeMetaElement;
    _Meta->setName( "fx_samplerCUBE_common" );
	_Meta->registerConstructor(domFx_samplerCUBE_common::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( _Meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "source" );
	mea->setOffset( daeOffsetOf(domFx_samplerCUBE_common,elemSource) );
	mea->setElementType( domFx_samplerCUBE_common::domSource::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 1, 0, 1 );
	mea->setName( "wrap_s" );
	mea->setOffset( daeOffsetOf(domFx_samplerCUBE_common,elemWrap_s) );
	mea->setElementType( domFx_samplerCUBE_common::domWrap_s::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 2, 0, 1 );
	mea->setName( "wrap_t" );
	mea->setOffset( daeOffsetOf(domFx_samplerCUBE_common,elemWrap_t) );
	mea->setElementType( domFx_samplerCUBE_common::domWrap_t::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 3, 0, 1 );
	mea->setName( "wrap_p" );
	mea->setOffset( daeOffsetOf(domFx_samplerCUBE_common,elemWrap_p) );
	mea->setElementType( domFx_samplerCUBE_common::domWrap_p::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 4, 0, 1 );
	mea->setName( "minfilter" );
	mea->setOffset( daeOffsetOf(domFx_samplerCUBE_common,elemMinfilter) );
	mea->setElementType( domFx_samplerCUBE_common::domMinfilter::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 5, 0, 1 );
	mea->setName( "magfilter" );
	mea->setOffset( daeOffsetOf(domFx_samplerCUBE_common,elemMagfilter) );
	mea->setElementType( domFx_samplerCUBE_common::domMagfilter::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 6, 0, 1 );
	mea->setName( "mipfilter" );
	mea->setOffset( daeOffsetOf(domFx_samplerCUBE_common,elemMipfilter) );
	mea->setElementType( domFx_samplerCUBE_common::domMipfilter::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 7, 0, 1 );
	mea->setName( "border_color" );
	mea->setOffset( daeOffsetOf(domFx_samplerCUBE_common,elemBorder_color) );
	mea->setElementType( domFx_samplerCUBE_common::domBorder_color::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 8, 0, 1 );
	mea->setName( "mipmap_maxlevel" );
	mea->setOffset( daeOffsetOf(domFx_samplerCUBE_common,elemMipmap_maxlevel) );
	mea->setElementType( domFx_samplerCUBE_common::domMipmap_maxlevel::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 9, 0, 1 );
	mea->setName( "mipmap_bias" );
	mea->setOffset( daeOffsetOf(domFx_samplerCUBE_common,elemMipmap_bias) );
	mea->setElementType( domFx_samplerCUBE_common::domMipmap_bias::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementArrayAttribute( _Meta, cm, 10, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domFx_samplerCUBE_common,elemExtra_array) );
	mea->setElementType( domExtra::registerElement() );
	cm->appendChild( mea );
	
	cm->setMaxOrdinal( 10 );
	_Meta->setCMRoot( cm );	
	
	
	_Meta->setElementSize(sizeof(domFx_samplerCUBE_common));
	_Meta->validate();

	return _Meta;
}
daeMetaElement *
domKinematics_model::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "kinematics_model" );
	meta->registerClass(domKinematics_model::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 0, 1 );
	mea->setName( "asset" );
	mea->setOffset( daeOffsetOf(domKinematics_model,elemAsset) );
	mea->setElementType( domAsset::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 1, 1, 1 );
	mea->setName( "technique_common" );
	mea->setOffset( daeOffsetOf(domKinematics_model,elemTechnique_common) );
	mea->setElementType( domKinematics_model_technique::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 2, 0, -1 );
	mea->setName( "technique" );
	mea->setOffset( daeOffsetOf(domKinematics_model,elemTechnique_array) );
	mea->setElementType( domTechnique::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 3, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domKinematics_model,elemExtra_array) );
	mea->setElementType( domExtra::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 3 );
	meta->setCMRoot( cm );	

	//	Add attribute: id
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "id" );
		ma->setType( dae.getAtomicTypes().get("xsID"));
		ma->setOffset( daeOffsetOf( domKinematics_model , attrId ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: name
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "name" );
		ma->setType( dae.getAtomicTypes().get("xsToken"));
		ma->setOffset( daeOffsetOf( domKinematics_model , attrName ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	meta->setElementSize(sizeof(domKinematics_model));
	meta->validate();

	return meta;
}
daeMetaElement *
domAsset::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "asset" );
	meta->registerClass(domAsset::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 0, -1 );
	mea->setName( "contributor" );
	mea->setOffset( daeOffsetOf(domAsset,elemContributor_array) );
	mea->setElementType( domAsset::domContributor::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 1, 1, 1 );
	mea->setName( "created" );
	mea->setOffset( daeOffsetOf(domAsset,elemCreated) );
	mea->setElementType( domAsset::domCreated::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 2, 0, 1 );
	mea->setName( "keywords" );
	mea->setOffset( daeOffsetOf(domAsset,elemKeywords) );
	mea->setElementType( domAsset::domKeywords::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 3, 1, 1 );
	mea->setName( "modified" );
	mea->setOffset( daeOffsetOf(domAsset,elemModified) );
	mea->setElementType( domAsset::domModified::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 4, 0, 1 );
	mea->setName( "revision" );
	mea->setOffset( daeOffsetOf(domAsset,elemRevision) );
	mea->setElementType( domAsset::domRevision::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 5, 0, 1 );
	mea->setName( "subject" );
	mea->setOffset( daeOffsetOf(domAsset,elemSubject) );
	mea->setElementType( domAsset::domSubject::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 6, 0, 1 );
	mea->setName( "title" );
	mea->setOffset( daeOffsetOf(domAsset,elemTitle) );
	mea->setElementType( domAsset::domTitle::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 7, 0, 1 );
	mea->setName( "unit" );
	mea->setOffset( daeOffsetOf(domAsset,elemUnit) );
	mea->setElementType( domAsset::domUnit::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 8, 0, 1 );
	mea->setName( "up_axis" );
	mea->setOffset( daeOffsetOf(domAsset,elemUp_axis) );
	mea->setElementType( domAsset::domUp_axis::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 8 );
	meta->setCMRoot( cm );	

	meta->setElementSize(sizeof(domAsset));
	meta->validate();

	return meta;
}
daeMetaElement *
domPhysics_model::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "physics_model" );
	meta->registerClass(domPhysics_model::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 0, 1 );
	mea->setName( "asset" );
	mea->setOffset( daeOffsetOf(domPhysics_model,elemAsset) );
	mea->setElementType( domAsset::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 1, 0, -1 );
	mea->setName( "rigid_body" );
	mea->setOffset( daeOffsetOf(domPhysics_model,elemRigid_body_array) );
	mea->setElementType( domRigid_body::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 2, 0, -1 );
	mea->setName( "rigid_constraint" );
	mea->setOffset( daeOffsetOf(domPhysics_model,elemRigid_constraint_array) );
	mea->setElementType( domRigid_constraint::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 3, 0, -1 );
	mea->setName( "instance_physics_model" );
	mea->setOffset( daeOffsetOf(domPhysics_model,elemInstance_physics_model_array) );
	mea->setElementType( domInstance_physics_model::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 4, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domPhysics_model,elemExtra_array) );
	mea->setElementType( domExtra::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 4 );
	meta->setCMRoot( cm );	

	//	Add attribute: id
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "id" );
		ma->setType( dae.getAtomicTypes().get("xsID"));
		ma->setOffset( daeOffsetOf( domPhysics_model , attrId ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: name
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "name" );
		ma->setType( dae.getAtomicTypes().get("xsNCName"));
		ma->setOffset( daeOffsetOf( domPhysics_model , attrName ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	meta->setElementSize(sizeof(domPhysics_model));
	meta->validate();

	return meta;
}
Exemple #15
0
daeMetaElement *
domFx_annotate_type_common::registerElement()
{
    if ( _Meta != NULL ) return _Meta;

    _Meta = new daeMetaElement;
    _Meta->setName( "fx_annotate_type_common" );
    _Meta->setStaticPointerAddress(&domFx_annotate_type_common::_Meta);
    _Meta->registerConstructor(domFx_annotate_type_common::create);

    _Meta->setIsTransparent( true );
    // Add elements: bool, bool2, bool3, bool4, int, int2, int3, int4, float, float2, float3, float4, float2x2, float3x3, float4x4, string
    _Meta->appendElement(domFx_annotate_type_common::domBool::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemBool));
    _Meta->appendElement(domFx_annotate_type_common::domBool2::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemBool2));
    _Meta->appendElement(domFx_annotate_type_common::domBool3::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemBool3));
    _Meta->appendElement(domFx_annotate_type_common::domBool4::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemBool4));
    _Meta->appendElement(domFx_annotate_type_common::domInt::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemInt));
    _Meta->appendElement(domFx_annotate_type_common::domInt2::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemInt2));
    _Meta->appendElement(domFx_annotate_type_common::domInt3::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemInt3));
    _Meta->appendElement(domFx_annotate_type_common::domInt4::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemInt4));
    _Meta->appendElement(domFx_annotate_type_common::domFloat::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemFloat));
    _Meta->appendElement(domFx_annotate_type_common::domFloat2::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemFloat2));
    _Meta->appendElement(domFx_annotate_type_common::domFloat3::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemFloat3));
    _Meta->appendElement(domFx_annotate_type_common::domFloat4::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemFloat4));
    _Meta->appendElement(domFx_annotate_type_common::domFloat2x2::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemFloat2x2));
    _Meta->appendElement(domFx_annotate_type_common::domFloat3x3::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemFloat3x3));
    _Meta->appendElement(domFx_annotate_type_common::domFloat4x4::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemFloat4x4));
    _Meta->appendElement(domFx_annotate_type_common::domString::registerElement(),daeOffsetOf(domFx_annotate_type_common,elemString));
    // Ordered list of sub-elements
    _Meta->addContents(daeOffsetOf(domFx_annotate_type_common,_contents));



    _Meta->setElementSize(sizeof(domFx_annotate_type_common));
    _Meta->validate();

    return _Meta;
}
Exemple #16
0
daeMetaElement *
domCOLLADA::registerElement()
{
    if ( _Meta != NULL ) return _Meta;
    
    _Meta = new daeMetaElement;
    _Meta->setName( "COLLADA" );
	_Meta->setStaticPointerAddress(&domCOLLADA::_Meta);
	_Meta->registerConstructor(domCOLLADA::create);

	// Add elements: asset, library_animations, library_animation_clips, library_cameras, library_controllers, library_geometries, library_effects, library_force_fields, library_images, library_lights, library_materials, library_nodes, library_physics_materials, library_physics_models, library_physics_scenes, library_visual_scenes, scene, extra
    _Meta->appendElement(domAsset::registerElement(),daeOffsetOf(domCOLLADA,elemAsset));
    _Meta->appendArrayElement(domLibrary_animations::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_animations_array));
    _Meta->appendArrayElement(domLibrary_animation_clips::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_animation_clips_array));
    _Meta->appendArrayElement(domLibrary_cameras::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_cameras_array));
    _Meta->appendArrayElement(domLibrary_controllers::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_controllers_array));
    _Meta->appendArrayElement(domLibrary_geometries::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_geometries_array));
    _Meta->appendArrayElement(domLibrary_effects::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_effects_array));
    _Meta->appendArrayElement(domLibrary_force_fields::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_force_fields_array));
    _Meta->appendArrayElement(domLibrary_images::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_images_array));
    _Meta->appendArrayElement(domLibrary_lights::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_lights_array));
    _Meta->appendArrayElement(domLibrary_materials::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_materials_array));
    _Meta->appendArrayElement(domLibrary_nodes::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_nodes_array));
    _Meta->appendArrayElement(domLibrary_physics_materials::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_physics_materials_array));
    _Meta->appendArrayElement(domLibrary_physics_models::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_physics_models_array));
    _Meta->appendArrayElement(domLibrary_physics_scenes::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_physics_scenes_array));
    _Meta->appendArrayElement(domLibrary_visual_scenes::registerElement(),daeOffsetOf(domCOLLADA,elemLibrary_visual_scenes_array));
    _Meta->appendElement(domCOLLADA::domScene::registerElement(),daeOffsetOf(domCOLLADA,elemScene));
    _Meta->appendArrayElement(domExtra::registerElement(),daeOffsetOf(domCOLLADA,elemExtra_array));
	// Ordered list of sub-elements
    _Meta->addContents(daeOffsetOf(domCOLLADA,_contents));

    //	Add attribute: xmlns
    {
		daeMetaAttribute* ma = new daeMetaAttribute;
		ma->setName( "xmlns" );
		ma->setType( daeAtomicType::get("xsAnyURI"));
		ma->setOffset( daeOffsetOf( domCOLLADA , attrXmlns ));
		ma->setContainer( _Meta );
		//ma->setIsRequired( true );
		_Meta->appendAttribute(ma);
	}
    
	//	Add attribute: version
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "version" );
		ma->setType( daeAtomicType::get("VersionType"));
		ma->setOffset( daeOffsetOf( domCOLLADA , attrVersion ));
		ma->setContainer( _Meta );
		ma->setIsRequired( true );
	
		_Meta->appendAttribute(ma);
	}
	
	
	_Meta->setElementSize(sizeof(domCOLLADA));
	_Meta->validate();

	return _Meta;
}
Exemple #17
0
daeMetaElement *
domProfile_GLSL::domTechnique::domPass::registerElement()
{
    if ( _Meta != NULL ) return _Meta;
    
    _Meta = new daeMetaElement;
    _Meta->setName( "pass" );
	_Meta->setStaticPointerAddress(&domProfile_GLSL::domTechnique::domPass::_Meta);
	_Meta->registerConstructor(domProfile_GLSL::domTechnique::domPass::create);

	// Add elements: annotate, color_target, depth_target, stencil_target, color_clear, depth_clear, stencil_clear, draw, gl_pipeline_settings, shader
    _Meta->appendArrayElement(domFx_annotate_common::registerElement(),daeOffsetOf(domProfile_GLSL::domTechnique::domPass,elemAnnotate_array),"annotate"); 
    _Meta->appendArrayElement(domFx_colortarget_common::registerElement(),daeOffsetOf(domProfile_GLSL::domTechnique::domPass,elemColor_target_array),"color_target"); 
    _Meta->appendArrayElement(domFx_depthtarget_common::registerElement(),daeOffsetOf(domProfile_GLSL::domTechnique::domPass,elemDepth_target_array),"depth_target"); 
    _Meta->appendArrayElement(domFx_stenciltarget_common::registerElement(),daeOffsetOf(domProfile_GLSL::domTechnique::domPass,elemStencil_target_array),"stencil_target"); 
    _Meta->appendArrayElement(domFx_clearcolor_common::registerElement(),daeOffsetOf(domProfile_GLSL::domTechnique::domPass,elemColor_clear_array),"color_clear"); 
    _Meta->appendArrayElement(domFx_cleardepth_common::registerElement(),daeOffsetOf(domProfile_GLSL::domTechnique::domPass,elemDepth_clear_array),"depth_clear"); 
    _Meta->appendArrayElement(domFx_clearstencil_common::registerElement(),daeOffsetOf(domProfile_GLSL::domTechnique::domPass,elemStencil_clear_array),"stencil_clear"); 
    _Meta->appendElement(domProfile_GLSL::domTechnique::domPass::domDraw::registerElement(),daeOffsetOf(domProfile_GLSL::domTechnique::domPass,elemDraw));
    _Meta->appendArrayElement(domGl_pipeline_settings::registerElement(),daeOffsetOf(domProfile_GLSL::domTechnique::domPass,elemGl_pipeline_settings_array));
	_Meta->appendPossibleChild( "alpha_func", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "blend_func", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "blend_func_separate", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "blend_equation", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "blend_equation_separate", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "color_material", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "cull_face", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "depth_func", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "fog_mode", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "fog_coord_src", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "front_face", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_model_color_control", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "logic_op", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "polygon_mode", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "shade_model", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "stencil_func", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "stencil_op", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "stencil_func_separate", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "stencil_op_separate", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "stencil_mask_separate", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_ambient", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_diffuse", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_specular", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_position", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_constant_attenuation", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_linear_attenuation", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_quadratic_attenuation", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_spot_cutoff", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_spot_direction", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_spot_exponent", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "texture1D", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "texture2D", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "texture3D", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "textureCUBE", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "textureRECT", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "textureDEPTH", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "texture1D_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "texture2D_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "texture3D_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "textureCUBE_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "textureRECT_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "textureDEPTH_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "texture_env_color", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "texture_env_mode", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "clip_plane", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "clip_plane_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "blend_color", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "clear_color", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "clear_stencil", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "clear_depth", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "color_mask", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "depth_bounds", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "depth_mask", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "depth_range", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "fog_density", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "fog_start", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "fog_end", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "fog_color", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_model_ambient", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "lighting_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "line_stipple", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "line_width", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "material_ambient", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "material_diffuse", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "material_emission", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "material_shininess", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "material_specular", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "model_view_matrix", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "point_distance_attenuation", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "point_fade_threshold_size", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "point_size", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "point_size_min", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "point_size_max", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "polygon_offset", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "projection_matrix", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "scissor", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "stencil_mask", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "alpha_test_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "auto_normal_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "blend_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "color_logic_op_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "cull_face_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "depth_bounds_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "depth_clamp_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "depth_test_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "dither_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "fog_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_model_local_viewer_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "light_model_two_side_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "line_smooth_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "line_stipple_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "logic_op_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "multisample_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "normalize_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "point_smooth_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "polygon_offset_fill_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "polygon_offset_line_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "polygon_offset_point_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "polygon_smooth_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "polygon_stipple_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "rescale_normal_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "sample_alpha_to_coverage_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "sample_alpha_to_one_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "sample_coverage_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "scissor_test_enable", _Meta->getMetaElements()[8]);
	_Meta->appendPossibleChild( "stencil_test_enable", _Meta->getMetaElements()[8]);
    _Meta->appendArrayElement(domProfile_GLSL::domTechnique::domPass::domShader::registerElement(),daeOffsetOf(domProfile_GLSL::domTechnique::domPass,elemShader_array));
	// Ordered list of sub-elements
    _Meta->addContents(daeOffsetOf(domProfile_GLSL::domTechnique::domPass,_contents));


	//	Add attribute: sid
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "sid" );
		ma->setType( daeAtomicType::get("xsNCName"));
		ma->setOffset( daeOffsetOf( domProfile_GLSL::domTechnique::domPass , attrSid ));
		ma->setContainer( _Meta );
		ma->setIsRequired( false );
	
		_Meta->appendAttribute(ma);
	}
	
	
	_Meta->setElementSize(sizeof(domProfile_GLSL::domTechnique::domPass));
	_Meta->validate();

	return _Meta;
}
daeMetaElement *
domGl_samplerDEPTH::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "gl_samplerDEPTH" );
	meta->registerClass(domGl_samplerDEPTH::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "source" );
	mea->setOffset( daeOffsetOf(domGl_samplerDEPTH,elemSource) );
	mea->setElementType( domSource::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 1, 0, 1 );
	mea->setName( "wrap_s" );
	mea->setOffset( daeOffsetOf(domGl_samplerDEPTH,elemWrap_s) );
	mea->setElementType( domWrap_s::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 2, 0, 1 );
	mea->setName( "wrap_t" );
	mea->setOffset( daeOffsetOf(domGl_samplerDEPTH,elemWrap_t) );
	mea->setElementType( domWrap_t::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 3, 0, 1 );
	mea->setName( "minfilter" );
	mea->setOffset( daeOffsetOf(domGl_samplerDEPTH,elemMinfilter) );
	mea->setElementType( domMinfilter::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 4, 0, 1 );
	mea->setName( "magfilter" );
	mea->setOffset( daeOffsetOf(domGl_samplerDEPTH,elemMagfilter) );
	mea->setElementType( domMagfilter::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 5, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domGl_samplerDEPTH,elemExtra_array) );
	mea->setElementType( domExtra::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 5 );
	cm->getParent()->appendChild( cm );
	cm = cm->getParent();

	cm->setMaxOrdinal( 5 );
	meta->setCMRoot( cm );	

	meta->setElementSize(sizeof(domGl_samplerDEPTH));
	meta->validate();

	return meta;
}
daeMetaElement *
domLinestrips::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "linestrips" );
	meta->registerClass(domLinestrips::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 0, -1 );
	mea->setName( "input" );
	mea->setOffset( daeOffsetOf(domLinestrips,elemInput_array) );
	mea->setElementType( domInput_local_offset::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 1, 0, -1 );
	mea->setName( "p" );
	mea->setOffset( daeOffsetOf(domLinestrips,elemP_array) );
	mea->setElementType( domP::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 2, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domLinestrips,elemExtra_array) );
	mea->setElementType( domExtra::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 2 );
	meta->setCMRoot( cm );	

	//	Add attribute: name
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "name" );
		ma->setType( dae.getAtomicTypes().get("xsToken"));
		ma->setOffset( daeOffsetOf( domLinestrips , attrName ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: count
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "count" );
		ma->setType( dae.getAtomicTypes().get("Uint"));
		ma->setOffset( daeOffsetOf( domLinestrips , attrCount ));
		ma->setContainer( meta );
		ma->setIsRequired( true );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: material
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "material" );
		ma->setType( dae.getAtomicTypes().get("xsNCName"));
		ma->setOffset( daeOffsetOf( domLinestrips , attrMaterial ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	meta->setElementSize(sizeof(domLinestrips));
	meta->validate();

	return meta;
}
Exemple #20
0
daeMetaElement *
domVisual_scene::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "visual_scene" );
	meta->registerClass(domVisual_scene::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 0, 1 );
	mea->setName( "asset" );
	mea->setOffset( daeOffsetOf(domVisual_scene,elemAsset) );
	mea->setElementType( domAsset::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 1, 1, -1 );
	mea->setName( "node" );
	mea->setOffset( daeOffsetOf(domVisual_scene,elemNode_array) );
	mea->setElementType( domNode::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 2, 0, -1 );
	mea->setName( "evaluate_scene" );
	mea->setOffset( daeOffsetOf(domVisual_scene,elemEvaluate_scene_array) );
	mea->setElementType( domVisual_scene::domEvaluate_scene::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 3, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domVisual_scene,elemExtra_array) );
	mea->setElementType( domExtra::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 3 );
	meta->setCMRoot( cm );	

	//	Add attribute: id
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "id" );
		ma->setType( dae.getAtomicTypes().get("xsID"));
		ma->setOffset( daeOffsetOf( domVisual_scene , attrId ));
		ma->setContainer( meta );
		ma->setIsRequired( false );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: name
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "name" );
		ma->setType( dae.getAtomicTypes().get("xsNCName"));
		ma->setOffset( daeOffsetOf( domVisual_scene , attrName ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	meta->setElementSize(sizeof(domVisual_scene));
	meta->validate();

	return meta;
}
daeMetaElement *
domFx_sampler1D_common::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "fx_sampler1D_common" );
	meta->registerClass(domFx_sampler1D_common::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "source" );
	mea->setOffset( daeOffsetOf(domFx_sampler1D_common,elemSource) );
	mea->setElementType( domFx_sampler1D_common::domSource::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 1, 0, 1 );
	mea->setName( "wrap_s" );
	mea->setOffset( daeOffsetOf(domFx_sampler1D_common,elemWrap_s) );
	mea->setElementType( domFx_sampler1D_common::domWrap_s::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 2, 0, 1 );
	mea->setName( "minfilter" );
	mea->setOffset( daeOffsetOf(domFx_sampler1D_common,elemMinfilter) );
	mea->setElementType( domFx_sampler1D_common::domMinfilter::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 3, 0, 1 );
	mea->setName( "magfilter" );
	mea->setOffset( daeOffsetOf(domFx_sampler1D_common,elemMagfilter) );
	mea->setElementType( domFx_sampler1D_common::domMagfilter::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 4, 0, 1 );
	mea->setName( "mipfilter" );
	mea->setOffset( daeOffsetOf(domFx_sampler1D_common,elemMipfilter) );
	mea->setElementType( domFx_sampler1D_common::domMipfilter::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 5, 0, 1 );
	mea->setName( "border_color" );
	mea->setOffset( daeOffsetOf(domFx_sampler1D_common,elemBorder_color) );
	mea->setElementType( domFx_sampler1D_common::domBorder_color::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 6, 0, 1 );
	mea->setName( "mipmap_maxlevel" );
	mea->setOffset( daeOffsetOf(domFx_sampler1D_common,elemMipmap_maxlevel) );
	mea->setElementType( domFx_sampler1D_common::domMipmap_maxlevel::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 7, 0, 1 );
	mea->setName( "mipmap_bias" );
	mea->setOffset( daeOffsetOf(domFx_sampler1D_common,elemMipmap_bias) );
	mea->setElementType( domFx_sampler1D_common::domMipmap_bias::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 8, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domFx_sampler1D_common,elemExtra_array) );
	mea->setElementType( domExtra::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 8 );
	meta->setCMRoot( cm );	

	meta->setElementSize(sizeof(domFx_sampler1D_common));
	meta->validate();

	return meta;
}
Exemple #22
0
daeMetaElement *
domFx_surface_init_from_common::registerElement()
{
    if ( _Meta != NULL ) return _Meta;
    
    _Meta = new daeMetaElement;
    _Meta->setName( "fx_surface_init_from_common" );
	_Meta->registerConstructor(domFx_surface_init_from_common::create);

	//	Add attribute: _value
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "_value" );
		ma->setType( daeAtomicType::get("xsIDREF"));
		ma->setOffset( daeOffsetOf( domFx_surface_init_from_common , _value ));
		ma->setContainer( _Meta );
		_Meta->appendAttribute(ma);
	}

	//	Add attribute: mip
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "mip" );
		ma->setType( daeAtomicType::get("xsUnsignedInt"));
		ma->setOffset( daeOffsetOf( domFx_surface_init_from_common , attrMip ));
		ma->setContainer( _Meta );
		ma->setDefault( "0");
	
		_Meta->appendAttribute(ma);
	}

	//	Add attribute: slice
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "slice" );
		ma->setType( daeAtomicType::get("xsUnsignedInt"));
		ma->setOffset( daeOffsetOf( domFx_surface_init_from_common , attrSlice ));
		ma->setContainer( _Meta );
		ma->setDefault( "0");
	
		_Meta->appendAttribute(ma);
	}

	//	Add attribute: face
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "face" );
		ma->setType( daeAtomicType::get("Fx_surface_face_enum"));
		ma->setOffset( daeOffsetOf( domFx_surface_init_from_common , attrFace ));
		ma->setContainer( _Meta );
		ma->setDefault( "POSITIVE_X");
	
		_Meta->appendAttribute(ma);
	}
	
	
	_Meta->setElementSize(sizeof(domFx_surface_init_from_common));
	_Meta->validate();

	return _Meta;
}
Exemple #23
0
daeMetaElement *
domCg_setparam::registerElement()
{
    if ( _Meta != NULL ) return _Meta;
    
    _Meta = new daeMetaElement;
    _Meta->setName( "cg_setparam" );
	_Meta->registerConstructor(domCg_setparam::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaChoice( _Meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "cg_param_type" );
	mea->setOffset( daeOffsetOf(domCg_setparam,elemCg_param_type) );
	mea->setElementType( domCg_param_type::registerElement() );
	cm->appendChild( new daeMetaGroup( mea, _Meta, cm, 0, 1, 1 ) );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "usertype" );
	mea->setOffset( daeOffsetOf(domCg_setparam,elemUsertype) );
	mea->setElementType( domCg_setuser_type::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "array" );
	mea->setOffset( daeOffsetOf(domCg_setparam,elemArray) );
	mea->setElementType( domCg_setarray_type::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "connect_param" );
	mea->setOffset( daeOffsetOf(domCg_setparam,elemConnect_param) );
	mea->setElementType( domCg_connect_param::registerElement() );
	cm->appendChild( mea );
	
	cm->setMaxOrdinal( 0 );
	_Meta->setCMRoot( cm );	
	// Ordered list of sub-elements
    _Meta->addContents(daeOffsetOf(domCg_setparam,_contents));
    _Meta->addContentsOrder(daeOffsetOf(domCg_setparam,_contentsOrder));


	//	Add attribute: ref
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "ref" );
		ma->setType( daeAtomicType::get("Cg_identifier"));
		ma->setOffset( daeOffsetOf( domCg_setparam , attrRef ));
		ma->setContainer( _Meta );
		ma->setIsRequired( true );
	
		_Meta->appendAttribute(ma);
	}

	//	Add attribute: program
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "program" );
		ma->setType( daeAtomicType::get("xsNCName"));
		ma->setOffset( daeOffsetOf( domCg_setparam , attrProgram ));
		ma->setContainer( _Meta );
	
		_Meta->appendAttribute(ma);
	}
	
	
	_Meta->setElementSize(sizeof(domCg_setparam));
	_Meta->validate();

	return _Meta;
}
Exemple #24
0
daeMetaElement *
domAccessor::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "accessor" );
	meta->registerClass(domAccessor::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 0, -1 );
	mea->setName( "param" );
	mea->setOffset( daeOffsetOf(domAccessor,elemParam_array) );
	mea->setElementType( domParam::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 0 );
	meta->setCMRoot( cm );	

	//	Add attribute: count
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "count" );
		ma->setType( dae.getAtomicTypes().get("Uint"));
		ma->setOffset( daeOffsetOf( domAccessor , attrCount ));
		ma->setContainer( meta );
		ma->setIsRequired( true );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: offset
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "offset" );
		ma->setType( dae.getAtomicTypes().get("Uint"));
		ma->setOffset( daeOffsetOf( domAccessor , attrOffset ));
		ma->setContainer( meta );
		ma->setDefaultString( "0");
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: source
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "source" );
		ma->setType( dae.getAtomicTypes().get("xsAnyURI"));
		ma->setOffset( daeOffsetOf( domAccessor , attrSource ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: stride
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "stride" );
		ma->setType( dae.getAtomicTypes().get("Uint"));
		ma->setOffset( daeOffsetOf( domAccessor , attrStride ));
		ma->setContainer( meta );
		ma->setDefaultString( "1");
	
		meta->appendAttribute(ma);
	}

	meta->setElementSize(sizeof(domAccessor));
	meta->validate();

	return meta;
}
Exemple #25
0
daeMetaElement *
domCommon_transparent_type::registerElement()
{
    if ( _Meta != NULL ) return _Meta;
    
    _Meta = new daeMetaElement;
    _Meta->setName( "common_transparent_type" );
	_Meta->registerConstructor(domCommon_transparent_type::create);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( _Meta, cm, 0, 1, 1 );

	cm = new daeMetaChoice( _Meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "color" );
	mea->setOffset( daeOffsetOf(domCommon_transparent_type,elemColor) );
	mea->setElementType( domColor::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "param" );
	mea->setOffset( daeOffsetOf(domCommon_transparent_type,elemParam) );
	mea->setElementType( domParam::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementAttribute( _Meta, cm, 0, 1, 1 );
	mea->setName( "texture" );
	mea->setOffset( daeOffsetOf(domCommon_transparent_type,elemTexture) );
	mea->setElementType( domTexture::registerElement() );
	cm->appendChild( mea );
	
	cm->setMaxOrdinal( 0 );
	cm->getParent()->appendChild( cm );
	cm = cm->getParent();
	
	cm->setMaxOrdinal( 0 );
	_Meta->setCMRoot( cm );	
	// Ordered list of sub-elements
    _Meta->addContents(daeOffsetOf(domCommon_transparent_type,_contents));
    _Meta->addContentsOrder(daeOffsetOf(domCommon_transparent_type,_contentsOrder));


	//	Add attribute: opaque
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "opaque" );
		ma->setType( daeAtomicType::get("Fx_opaque_enum"));
		ma->setOffset( daeOffsetOf( domCommon_transparent_type , attrOpaque ));
		ma->setContainer( _Meta );
		ma->setDefault( "A_ONE");
	
		_Meta->appendAttribute(ma);
	}
	
	
	_Meta->setElementSize(sizeof(domCommon_transparent_type));
	_Meta->validate();

	return _Meta;
}
Exemple #26
0
daeMetaElement *
domTristrips::registerElement()
{
    if ( _Meta != NULL ) return _Meta;
    
    _Meta = new daeMetaElement;
    _Meta->setName( "tristrips" );
	_Meta->registerClass(domTristrips::create, &_Meta);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( _Meta, cm, 0, 1, 1 );

	mea = new daeMetaElementArrayAttribute( _Meta, cm, 0, 0, -1 );
	mea->setName( "input" );
	mea->setOffset( daeOffsetOf(domTristrips,elemInput_array) );
	mea->setElementType( domInputLocalOffset::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementArrayAttribute( _Meta, cm, 1, 0, -1 );
	mea->setName( "p" );
	mea->setOffset( daeOffsetOf(domTristrips,elemP_array) );
	mea->setElementType( domP::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementArrayAttribute( _Meta, cm, 2, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domTristrips,elemExtra_array) );
	mea->setElementType( domExtra::registerElement() );
	cm->appendChild( mea );
	
	cm->setMaxOrdinal( 2 );
	_Meta->setCMRoot( cm );	

	//	Add attribute: name
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "name" );
		ma->setType( daeAtomicType::get("xsNCName"));
		ma->setOffset( daeOffsetOf( domTristrips , attrName ));
		ma->setContainer( _Meta );
	
		_Meta->appendAttribute(ma);
	}

	//	Add attribute: count
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "count" );
		ma->setType( daeAtomicType::get("Uint"));
		ma->setOffset( daeOffsetOf( domTristrips , attrCount ));
		ma->setContainer( _Meta );
		ma->setIsRequired( true );
	
		_Meta->appendAttribute(ma);
	}

	//	Add attribute: material
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "material" );
		ma->setType( daeAtomicType::get("xsNCName"));
		ma->setOffset( daeOffsetOf( domTristrips , attrMaterial ));
		ma->setContainer( _Meta );
	
		_Meta->appendAttribute(ma);
	}
	
	
	_Meta->setElementSize(sizeof(domTristrips));
	_Meta->validate();

	return _Meta;
}
Exemple #27
0
daeMetaElement *
domRigid_body::domTechnique_common::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "technique_common" );
	meta->registerClass(domRigid_body::domTechnique_common::create);

	meta->setIsInnerClass( true );
	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 0, 1 );
	mea->setName( "dynamic" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common,elemDynamic) );
	mea->setElementType( domRigid_body::domTechnique_common::domDynamic::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 1, 0, 1 );
	mea->setName( "mass" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common,elemMass) );
	mea->setElementType( domTargetableFloat::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 2, 0, 1 );
	mea->setName( "mass_frame" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common,elemMass_frame) );
	mea->setElementType( domRigid_body::domTechnique_common::domMass_frame::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 3, 0, 1 );
	mea->setName( "inertia" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common,elemInertia) );
	mea->setElementType( domTargetableFloat3::registerElement(dae) );
	cm->appendChild( mea );

	cm = new daeMetaChoice( meta, cm, 0, 4, 0, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "instance_physics_material" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common,elemInstance_physics_material) );
	mea->setElementType( domInstance_physics_material::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "physics_material" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common,elemPhysics_material) );
	mea->setElementType( domPhysics_material::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 0 );
	cm->getParent()->appendChild( cm );
	cm = cm->getParent();

	mea = new daeMetaElementArrayAttribute( meta, cm, 5, 1, -1 );
	mea->setName( "shape" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common,elemShape_array) );
	mea->setElementType( domRigid_body::domTechnique_common::domShape::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 5 );
	meta->setCMRoot( cm );	
	// Ordered list of sub-elements
	meta->addContents(daeOffsetOf(domRigid_body::domTechnique_common,_contents));
	meta->addContentsOrder(daeOffsetOf(domRigid_body::domTechnique_common,_contentsOrder));

	meta->addCMDataArray(daeOffsetOf(domRigid_body::domTechnique_common,_CMData), 1);
	meta->setElementSize(sizeof(domRigid_body::domTechnique_common));
	meta->validate();

	return meta;
}
daeMetaElement *
domLibrary_physics_models::registerElement()
{
    if ( _Meta != NULL ) return _Meta;
    
    _Meta = new daeMetaElement;
    _Meta->setName( "library_physics_models" );
	_Meta->registerClass(domLibrary_physics_models::create, &_Meta);

	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( _Meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( _Meta, cm, 0, 0, 1 );
	mea->setName( "asset" );
	mea->setOffset( daeOffsetOf(domLibrary_physics_models,elemAsset) );
	mea->setElementType( domAsset::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementArrayAttribute( _Meta, cm, 1, 1, -1 );
	mea->setName( "physics_model" );
	mea->setOffset( daeOffsetOf(domLibrary_physics_models,elemPhysics_model_array) );
	mea->setElementType( domPhysics_model::registerElement() );
	cm->appendChild( mea );
	
	mea = new daeMetaElementArrayAttribute( _Meta, cm, 2, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domLibrary_physics_models,elemExtra_array) );
	mea->setElementType( domExtra::registerElement() );
	cm->appendChild( mea );
	
	cm->setMaxOrdinal( 2 );
	_Meta->setCMRoot( cm );	

	//	Add attribute: id
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "id" );
		ma->setType( daeAtomicType::get("xsID"));
		ma->setOffset( daeOffsetOf( domLibrary_physics_models , attrId ));
		ma->setContainer( _Meta );
	
		_Meta->appendAttribute(ma);
	}

	//	Add attribute: name
 	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "name" );
		ma->setType( daeAtomicType::get("xsNCName"));
		ma->setOffset( daeOffsetOf( domLibrary_physics_models , attrName ));
		ma->setContainer( _Meta );
	
		_Meta->appendAttribute(ma);
	}
	
	
	_Meta->setElementSize(sizeof(domLibrary_physics_models));
	_Meta->validate();

	return _Meta;
}
Exemple #29
0
daeMetaElement *
domRigid_body::domTechnique_common::domShape::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "shape" );
	meta->registerClass(domRigid_body::domTechnique_common::domShape::create);

	meta->setIsInnerClass( true );
	daeMetaCMPolicy *cm = NULL;
	daeMetaElementAttribute *mea = NULL;
	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 0, 1 );
	mea->setName( "hollow" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemHollow) );
	mea->setElementType( domRigid_body::domTechnique_common::domShape::domHollow::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 1, 0, 1 );
	mea->setName( "mass" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemMass) );
	mea->setElementType( domTargetableFloat::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 2, 0, 1 );
	mea->setName( "density" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemDensity) );
	mea->setElementType( domTargetableFloat::registerElement(dae) );
	cm->appendChild( mea );

	cm = new daeMetaChoice( meta, cm, 0, 3, 0, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "instance_physics_material" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemInstance_physics_material) );
	mea->setElementType( domInstance_physics_material::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "physics_material" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemPhysics_material) );
	mea->setElementType( domPhysics_material::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 0 );
	cm->getParent()->appendChild( cm );
	cm = cm->getParent();

	cm = new daeMetaChoice( meta, cm, 1, 4, 1, 1 );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "instance_geometry" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemInstance_geometry) );
	mea->setElementType( domInstance_geometry::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "plane" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemPlane) );
	mea->setElementType( domPlane::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "box" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemBox) );
	mea->setElementType( domBox::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "sphere" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemSphere) );
	mea->setElementType( domSphere::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "cylinder" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemCylinder) );
	mea->setElementType( domCylinder::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "tapered_cylinder" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemTapered_cylinder) );
	mea->setElementType( domTapered_cylinder::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "capsule" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemCapsule) );
	mea->setElementType( domCapsule::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "tapered_capsule" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemTapered_capsule) );
	mea->setElementType( domTapered_capsule::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 0 );
	cm->getParent()->appendChild( cm );
	cm = cm->getParent();

	cm = new daeMetaChoice( meta, cm, 2, 5, 0, -1 );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "translate" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemTranslate_array) );
	mea->setElementType( domTranslate::registerElement(dae) );
	cm->appendChild( mea );

	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, 1 );
	mea->setName( "rotate" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemRotate_array) );
	mea->setElementType( domRotate::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 0 );
	cm->getParent()->appendChild( cm );
	cm = cm->getParent();

	mea = new daeMetaElementArrayAttribute( meta, cm, 3006, 0, -1 );
	mea->setName( "extra" );
	mea->setOffset( daeOffsetOf(domRigid_body::domTechnique_common::domShape,elemExtra_array) );
	mea->setElementType( domExtra::registerElement(dae) );
	cm->appendChild( mea );

	cm->setMaxOrdinal( 3006 );
	meta->setCMRoot( cm );	
	// Ordered list of sub-elements
	meta->addContents(daeOffsetOf(domRigid_body::domTechnique_common::domShape,_contents));
	meta->addContentsOrder(daeOffsetOf(domRigid_body::domTechnique_common::domShape,_contentsOrder));

	meta->addCMDataArray(daeOffsetOf(domRigid_body::domTechnique_common::domShape,_CMData), 3);
	meta->setElementSize(sizeof(domRigid_body::domTechnique_common::domShape));
	meta->validate();

	return meta;
}
Exemple #30
0
daeMetaElement *
domParam::registerElement(DAE& dae)
{
	daeMetaElement* meta = dae.getMeta(ID());
	if ( meta != NULL ) return meta;

	meta = new daeMetaElement(dae);
	dae.setMeta(ID(), *meta);
	meta->setName( "param" );
	meta->registerClass(domParam::create);

	//	Add attribute: _value
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "_value" );
		ma->setType( dae.getAtomicTypes().get("xsString"));
		ma->setOffset( daeOffsetOf( domParam , _value ));
		ma->setContainer( meta );
		meta->appendAttribute(ma);
	}

	//	Add attribute: name
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "name" );
		ma->setType( dae.getAtomicTypes().get("xsNCName"));
		ma->setOffset( daeOffsetOf( domParam , attrName ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: sid
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "sid" );
		ma->setType( dae.getAtomicTypes().get("xsNCName"));
		ma->setOffset( daeOffsetOf( domParam , attrSid ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: semantic
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "semantic" );
		ma->setType( dae.getAtomicTypes().get("xsNMTOKEN"));
		ma->setOffset( daeOffsetOf( domParam , attrSemantic ));
		ma->setContainer( meta );
	
		meta->appendAttribute(ma);
	}

	//	Add attribute: type
	{
		daeMetaAttribute *ma = new daeMetaAttribute;
		ma->setName( "type" );
		ma->setType( dae.getAtomicTypes().get("xsNMTOKEN"));
		ma->setOffset( daeOffsetOf( domParam , attrType ));
		ma->setContainer( meta );
		ma->setIsRequired( true );
	
		meta->appendAttribute(ma);
	}

	meta->setElementSize(sizeof(domParam));
	meta->validate();

	return meta;
}