예제 #1
0
파일: vrml_tools.c 프로젝트: erelh/gpac
void *gf_sg_vrml_field_pointer_new(u32 FieldType)
{
	switch (FieldType) {
	case GF_SG_VRML_SFBOOL: return NewSFBool();
	case GF_SG_VRML_SFFLOAT: return NewSFFloat();
	case GF_SG_VRML_SFDOUBLE: return NewSFDouble();
	case GF_SG_VRML_SFTIME: return NewSFTime();
	case GF_SG_VRML_SFINT32: return NewSFInt32();
	case GF_SG_VRML_SFSTRING: return NewSFString();
	case GF_SG_VRML_SFVEC3F: return NewSFVec3f();
	case GF_SG_VRML_SFVEC2F: return NewSFVec2f();
	case GF_SG_VRML_SFVEC3D: return NewSFVec3d();
	case GF_SG_VRML_SFVEC2D: return NewSFVec2d();
	case GF_SG_VRML_SFCOLOR: return NewSFColor();
	case GF_SG_VRML_SFCOLORRGBA: return NewSFColorRGBA();
	case GF_SG_VRML_SFROTATION: return NewSFRotation();
	case GF_SG_VRML_SFIMAGE: return NewSFImage();
	case GF_SG_VRML_SFATTRREF: return NewSFAttrRef();
	case GF_SG_VRML_MFBOOL: return NewMFBool();
	case GF_SG_VRML_MFFLOAT: return NewMFFloat();
	case GF_SG_VRML_MFTIME: return NewMFTime();
	case GF_SG_VRML_MFINT32: return NewMFInt32();
	case GF_SG_VRML_MFSTRING: return NewMFString();
	case GF_SG_VRML_MFVEC3F: return NewMFVec3f();
	case GF_SG_VRML_MFVEC2F: return NewMFVec2f();
	case GF_SG_VRML_MFVEC3D: return NewMFVec3d();
	case GF_SG_VRML_MFVEC2D: return NewMFVec2d();
	case GF_SG_VRML_MFCOLOR: return NewMFColor();
	case GF_SG_VRML_MFCOLORRGBA: return NewMFColorRGBA();
	case GF_SG_VRML_MFROTATION:
	case GF_SG_VRML_MFVEC4F:
		return NewMFRotation();
	case GF_SG_VRML_MFATTRREF: return NewMFAttrRef();

	//used in commands
	case GF_SG_VRML_SFCOMMANDBUFFER:
		return NewSFCommandBuffer();

	case GF_SG_VRML_SFURL:
		return NewSFURL();
	case GF_SG_VRML_MFURL:
		return NewMFURL();

	case GF_SG_VRML_SFSCRIPT:
		return NewSFScript();
	case GF_SG_VRML_MFSCRIPT:
		return NewMFScript();
	}
	return NULL;
}
예제 #2
0
void *VRML_NewFieldPointer(u32 FieldType) 
{
	switch (FieldType) {
	case FT_SFBool: return NewSFBool();
	case FT_SFFloat: return NewSFFloat();
	case FT_SFDouble: return NewSFDouble();
	case FT_SFTime: return NewSFTime();
	case FT_SFInt32: return NewSFInt32();
	case FT_SFString: return NewSFString();
	case FT_SFVec3f: return NewSFVec3f();
	case FT_SFVec2f: return NewSFVec2f();
	case FT_SFVec3d: return NewSFVec3d();
	case FT_SFVec2d: return NewSFVec2d();
	case FT_SFColor: return NewSFColor();
	case FT_SFColorRGBA: return NewSFColorRGBA();
	case FT_SFRotation: return NewSFRotation();
	case FT_SFImage: return NewSFImage();
	case FT_MFBool: return NewMFBool();
	case FT_MFFloat: return NewMFFloat();
	case FT_MFTime: return NewMFTime();
	case FT_MFInt32: return NewMFInt32();
	case FT_MFString: return NewMFString();
	case FT_MFVec3f: return NewMFVec3f();
	case FT_MFVec2f: return NewMFVec2f();
	case FT_MFVec3d: return NewMFVec3d();
	case FT_MFVec2d: return NewMFVec2d();
	case FT_MFColor: return NewMFColor();
	case FT_MFColorRGBA: return NewMFColorRGBA();
	case FT_MFRotation: return NewMFRotation();

	//used in proto and script 
	case FT_MFNode: 
	{
		return NewChain();
	}
	//used in commands
	case FT_SFCommandBuffer:
		return NewSFCommandBuffer();

	case FT_SFURL: 
		return NewSFURL();
	case FT_MFURL:
		return NewMFURL();
	}
	return NULL;
}