⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scenegraph_vrml.h

📁 一个用于智能手机的多媒体库适合S60 WinCE的跨平台开发库
💻 H
📖 第 1 页 / 共 2 页
字号:
/* *			GPAC - Multimedia Framework C SDK * *			Copyright (c) Jean Le Feuvre 2000-2005 *					All rights reserved * *  This file is part of GPAC / Scene Graph sub-project * *  GPAC is free software; you can redistribute it and/or modify *  it under the terms of the GNU Lesser General Public License as published by *  the Free Software Foundation; either version 2, or (at your option) *  any later version. *    *  GPAC is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU Lesser General Public License for more details. *    *  You should have received a copy of the GNU Lesser General Public *  License along with this library; see the file COPYING.  If not, write to *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  * */#ifndef _GF_SG_VRML_H_#define _GF_SG_VRML_H_#ifdef __cplusplusextern "C" {#endif#include <gpac/scenegraph.h>#include <gpac/math.h>/*	All extensions for VRML/MPEG-4/X3D graph structure	*//*reserved NDT for MPEG4 (match binary coding)*/#define MPEG4_RESERVED_NDT		200/*the NDTs used in X3D not defined in MPEG4*/enum{	NDT_SFMetadataNode = MPEG4_RESERVED_NDT+1,	NDT_SFFillPropertiesNode,	NDT_SFX3DLinePropertiesNode,	NDT_SFGeoOriginNode,	NDT_SFHAnimNode,	NDT_SFHAnimDisplacerNode,	NDT_SFNurbsControlCurveNode,	NDT_SFNurbsSurfaceNode,	NDT_SFNurbsCurveNode};/*	VRML / BIFS TYPES DEFINITION*//*				event types, as defined in the specs 	this should not be needed by non binary codecs*/enum{	GF_SG_EVENT_FIELD		=	0,	GF_SG_EVENT_EXPOSED_FIELD	=	1,	GF_SG_EVENT_IN		=	2,	GF_SG_EVENT_OUT		=	3,	GF_SG_EVENT_UNKNOWN	=	4};const char *gf_sg_vrml_get_event_type_name(u32 EventType, Bool forX3D);/*				field coding mode	BIFS defines the bitstream syntax contextually, and therefore sometimes refer to fields as indexed  in the node ("all" mode) or just as a sub-set (in, out, def, dyn modes) of similar types*/enum{	/*all fields and events*/	GF_SG_FIELD_CODING_ALL		=	0,	/*defined fields (exposedField and Field)*/	GF_SG_FIELD_CODING_DEF		=	1,	/*input field (exposedField and eventIn)*/	GF_SG_FIELD_CODING_IN		=	2,	/*output field (exposedField and eventOut)*/	GF_SG_FIELD_CODING_OUT		=	3,	/*field that can be animated (subset of inFields) used in BIFS_Anim only*/	GF_SG_FIELD_CODING_DYN		=	4};/*get the number of field in the given mode (BIFS specific)*/u32 gf_node_get_num_fields_in_mode(GF_Node *Node, u8 IndexMode);/*		SF Types	*/typedef Bool SFBool;typedef s32 SFInt32;typedef s32 SFInt;typedef Fixed SFFloat;typedef Double SFDouble;typedef struct{	char* buffer;} SFString;typedef Double SFTime;typedef struct {	Fixed	red;	Fixed	green;	Fixed	blue;} SFColor;typedef struct {	Fixed	red;	Fixed	green;	Fixed	blue;	Fixed	alpha;} SFColorRGBA;typedef struct {	u32 OD_ID;	char *url;} SFURL;typedef struct {	Double	x;	Double	y;} SFVec2d;typedef struct {	Double	x;	Double	y;	Double	z;} SFVec3d;/*typedef's to main math tools*/typedef struct __vec2f SFVec2f;typedef struct __vec3f SFVec3f;typedef struct __vec4f SFRotation;typedef struct __vec4f SFVec4f;typedef struct {	u32 width;	u32 height;	u8 numComponents;	unsigned char* pixels;} SFImage;typedef struct {	u32 bufferSize;	unsigned char* buffer;	/*uncompressed command list*/	GF_List *commandList;} SFCommandBuffer;/*Note on SFScript: the javascript or vrml script is handled in its decompressed (textual) formatsince most JS interpreter work with text*/typedef struct {	unsigned char* script_text;} SFScript;/*		MF Types	*//*generic MF field: all MF fields use the same syntax except MFNode which uses GF_List. You  can thus usethis structure to safely typecast MF field pointers*/typedef struct {	u32 count;	char *array;} GenMFField;typedef struct {	u32 count;	s32* vals;} MFInt32;typedef struct {	u32 count;	s32* vals;} MFInt;typedef struct {	u32 count;	Fixed *vals;} MFFloat;typedef struct {	u32 count;	Double *vals;} MFDouble;typedef struct {	u32 count;	u32* vals;} MFBool;typedef struct {	u32 count;	SFColor* vals;} MFColor;typedef struct {	u32 count;	SFColorRGBA* vals;} MFColorRGBA;typedef struct {	u32 count;	SFRotation*	vals;} MFRotation;typedef struct {	u32 count;	Double* vals;} MFTime;typedef struct {	u32 count;	SFVec2f* vals;} MFVec2f;typedef struct {	u32 count;	SFVec2d* vals;} MFVec2d;typedef struct {	u32 count;	SFVec3f* vals;} MFVec3f;typedef struct {	u32 count;	SFVec3d* vals;} MFVec3d;typedef struct {	u32 count;	SFVec4f* vals;} MFVec4f;typedef struct {	u32 count;	SFURL* vals;} MFURL;typedef struct {	u32 count;	char** vals;} MFString;typedef struct {	u32 count;	SFScript *vals;} MFScript;SFColorRGBA gf_sg_sfcolor_to_rgba(SFColor val);/*field types, as defined in BIFS encoding (used for scripts and proto coding)*/enum{	GF_SG_VRML_SFBOOL		=	0,	GF_SG_VRML_SFFLOAT		=	1,	GF_SG_VRML_SFTIME		=	2,	GF_SG_VRML_SFINT32		=	3,	GF_SG_VRML_SFSTRING		=	4,	GF_SG_VRML_SFVEC3F		=	5,	GF_SG_VRML_SFVEC2F		=	6,	GF_SG_VRML_SFCOLOR		=	7,	GF_SG_VRML_SFROTATION	=	8,	GF_SG_VRML_SFIMAGE		=	9,	GF_SG_VRML_SFNODE		=	10,	/*TO CHECK*/	GF_SG_VRML_SFVEC4F		=	11,	GF_SG_VRML_MFBOOL		=	32,	GF_SG_VRML_MFFLOAT		=	33,	GF_SG_VRML_MFTIME		=	34,	GF_SG_VRML_MFINT32		=	35,	GF_SG_VRML_MFSTRING		=	36,	GF_SG_VRML_MFVEC3F		=	37,	GF_SG_VRML_MFVEC2F		=	38,	GF_SG_VRML_MFCOLOR		=	39,	GF_SG_VRML_MFROTATION	=	40,	GF_SG_VRML_MFIMAGE		=	41,	GF_SG_VRML_MFNODE		=	42,	/*TO CHECK*/	GF_SG_VRML_MFVEC4F		=	43,	/*used types in GPAC but not defined in the MPEG4 spec*/	GF_SG_VRML_SFURL			=	50,	GF_SG_VRML_MFURL,	GF_SG_VRML_SFCOMMANDBUFFER,	GF_SG_VRML_SFSCRIPT,	GF_SG_VRML_MFSCRIPT,	/*used types in X3D*/	GF_SG_VRML_SFDOUBLE,	GF_SG_VRML_SFCOLORRGBA,	GF_SG_VRML_SFVEC2D,	GF_SG_VRML_SFVEC3D,	GF_SG_VRML_MFDOUBLE,	GF_SG_VRML_MFCOLORRGBA,	GF_SG_VRML_MFVEC2D,	GF_SG_VRML_MFVEC3D,	GF_SG_VRML_UNKNOWN};const char *gf_sg_vrml_get_field_type_by_name(u32 FieldType);/*allocates a new field and gets it back. 	NOTE:			GF_SG_VRML_MFNODE will return a pointer to a GF_List structure (eg GF_List *)			GF_SG_VRML_SFNODE will return NULL*/void *gf_sg_vrml_field_pointer_new(u32 FieldType);/*deletes a field pointer (including SF an,d MF nodes)*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -