OSDN Git Service

stop using trunk or dist directory in rec10 project.
[rec10/rec10-git.git] / tstools / DtsEdit / src / gpac / scenegraph_vrml.h
diff --git a/tstools/DtsEdit/src/gpac/scenegraph_vrml.h b/tstools/DtsEdit/src/gpac/scenegraph_vrml.h
deleted file mode 100644 (file)
index f0af8fb..0000000
+++ /dev/null
@@ -1,623 +0,0 @@
-/*\r
- *                     GPAC - Multimedia Framework C SDK\r
- *\r
- *                     Copyright (c) Jean Le Feuvre 2000-2005\r
- *                                     All rights reserved\r
- *\r
- *  This file is part of GPAC / Scene Graph sub-project\r
- *\r
- *  GPAC is free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU Lesser General Public License as published by\r
- *  the Free Software Foundation; either version 2, or (at your option)\r
- *  any later version.\r
- *   \r
- *  GPAC is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU Lesser General Public License for more details.\r
- *   \r
- *  You should have received a copy of the GNU Lesser General Public\r
- *  License along with this library; see the file COPYING.  If not, write to\r
- *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
- *\r
- */\r
-\r
-\r
-#ifndef _GF_SG_VRML_H_\r
-#define _GF_SG_VRML_H_\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-#include <gpac/scenegraph.h>\r
-#include <gpac/math.h>\r
-\r
-/*\r
-       All extensions for VRML/MPEG-4/X3D graph structure      \r
-*/\r
-\r
-/*reserved NDT for MPEG4 (match binary coding)*/\r
-#define MPEG4_RESERVED_NDT             200\r
-\r
-/*the NDTs used in X3D not defined in MPEG4*/\r
-enum\r
-{\r
-       NDT_SFMetadataNode = MPEG4_RESERVED_NDT+1,\r
-       NDT_SFFillPropertiesNode,\r
-       NDT_SFX3DLinePropertiesNode,\r
-       NDT_SFGeoOriginNode,\r
-       NDT_SFHAnimNode,\r
-       NDT_SFHAnimDisplacerNode,\r
-       NDT_SFNurbsControlCurveNode,\r
-       NDT_SFNurbsSurfaceNode,\r
-       NDT_SFNurbsCurveNode\r
-};\r
-\r
-/*\r
-       VRML / BIFS TYPES DEFINITION\r
-*/\r
-\r
-/*\r
-                               event types, as defined in the specs \r
-       this should not be needed by non binary codecs\r
-*/\r
-enum\r
-{\r
-       GF_SG_EVENT_FIELD               =       0,\r
-       GF_SG_EVENT_EXPOSED_FIELD       =       1,\r
-       GF_SG_EVENT_IN          =       2,\r
-       GF_SG_EVENT_OUT         =       3,\r
-       GF_SG_EVENT_UNKNOWN     =       4\r
-};\r
-const char *gf_sg_vrml_get_event_type_name(u32 EventType, Bool forX3D);\r
-\r
-/*\r
-                               field coding mode\r
-\r
-       BIFS defines the bitstream syntax contextually, and therefore sometimes refer to fields as indexed\r
-  in the node ("all" mode) or just as a sub-set (in, out, def, dyn modes) of similar types\r
-*/\r
-enum\r
-{\r
-       /*all fields and events*/\r
-       GF_SG_FIELD_CODING_ALL          =       0,\r
-       /*defined fields (exposedField and Field)*/\r
-       GF_SG_FIELD_CODING_DEF          =       1,\r
-       /*input field (exposedField and eventIn)*/\r
-       GF_SG_FIELD_CODING_IN           =       2,\r
-       /*output field (exposedField and eventOut)*/\r
-       GF_SG_FIELD_CODING_OUT          =       3,\r
-       /*field that can be animated (subset of inFields) used in BIFS_Anim only*/\r
-       GF_SG_FIELD_CODING_DYN          =       4\r
-};\r
-\r
-/*get the number of field in the given mode (BIFS specific)*/\r
-u32 gf_node_get_num_fields_in_mode(GF_Node *Node, u8 IndexMode);\r
-\r
-/*             SF Types        */\r
-typedef Bool SFBool;\r
-typedef s32 SFInt32;\r
-typedef s32 SFInt;\r
-typedef Fixed SFFloat;\r
-typedef Double SFDouble;\r
-\r
-typedef struct\r
-{\r
-       char* buffer;\r
-} SFString;\r
-\r
-typedef Double SFTime;\r
-\r
-typedef struct {\r
-       Fixed   red;\r
-       Fixed   green;\r
-       Fixed   blue;\r
-} SFColor;\r
-\r
-typedef struct {\r
-       Fixed   red;\r
-       Fixed   green;\r
-       Fixed   blue;\r
-       Fixed   alpha;\r
-} SFColorRGBA;\r
-\r
-typedef struct {\r
-       u32 OD_ID;\r
-       char *url;\r
-} SFURL;\r
-\r
-typedef struct {\r
-       Double  x;\r
-       Double  y;\r
-} SFVec2d;\r
-\r
-typedef struct {\r
-       Double  x;\r
-       Double  y;\r
-       Double  z;\r
-} SFVec3d;\r
-\r
-/*typedef's to main math tools*/\r
-typedef struct __vec2f SFVec2f;\r
-typedef struct __vec3f SFVec3f;\r
-typedef struct __vec4f SFRotation;\r
-typedef struct __vec4f SFVec4f;\r
-\r
-typedef struct {\r
-       u32 width;\r
-       u32 height;\r
-       u8 numComponents;\r
-       unsigned char* pixels;\r
-} SFImage;\r
-typedef struct {\r
-       u32 bufferSize;\r
-       unsigned char* buffer;\r
-       /*uncompressed command list*/\r
-       GF_List *commandList;\r
-} SFCommandBuffer;\r
-\r
-/*Note on SFScript: the javascript or vrml script is handled in its decompressed (textual) format\r
-since most JS interpreter work with text*/\r
-typedef struct {\r
-       unsigned char* script_text;\r
-} SFScript;\r
-\r
-\r
-/*             MF Types        */\r
-\r
-/*generic MF field: all MF fields use the same syntax except MFNode which uses GF_List. You  can thus use\r
-this structure to safely typecast MF field pointers*/\r
-typedef struct {\r
-       u32 count;\r
-       char *array;\r
-} GenMFField;\r
-\r
-typedef struct {\r
-       u32 count;\r
-       s32* vals;\r
-} MFInt32;\r
-typedef struct {\r
-       u32 count;\r
-       s32* vals;\r
-} MFInt;\r
-typedef struct {\r
-       u32 count;\r
-       Fixed *vals;\r
-} MFFloat;\r
-typedef struct {\r
-       u32 count;\r
-       Double *vals;\r
-} MFDouble;\r
-typedef struct {\r
-       u32 count;\r
-       u32* vals;\r
-} MFBool;\r
-typedef struct {\r
-       u32 count;\r
-       SFColor* vals;\r
-} MFColor;\r
-typedef struct {\r
-       u32 count;\r
-       SFColorRGBA* vals;\r
-} MFColorRGBA;\r
-typedef struct {\r
-       u32 count;\r
-       SFRotation*     vals;\r
-} MFRotation;\r
-typedef struct {\r
-       u32 count;\r
-       Double* vals;\r
-} MFTime;\r
-typedef struct {\r
-       u32 count;\r
-       SFVec2f* vals;\r
-} MFVec2f;\r
-typedef struct {\r
-       u32 count;\r
-       SFVec2d* vals;\r
-} MFVec2d;\r
-typedef struct {\r
-       u32 count;\r
-       SFVec3f* vals;\r
-} MFVec3f;\r
-typedef struct {\r
-       u32 count;\r
-       SFVec3d* vals;\r
-} MFVec3d;\r
-typedef struct {\r
-       u32 count;\r
-       SFVec4f* vals;\r
-} MFVec4f;\r
-\r
-typedef struct {\r
-       u32 count;\r
-       SFURL* vals;\r
-} MFURL;\r
-typedef struct {\r
-       u32 count;\r
-       char** vals;\r
-} MFString;\r
-typedef struct {\r
-       u32 count;\r
-       SFScript *vals;\r
-} MFScript;\r
-\r
-\r
-SFColorRGBA gf_sg_sfcolor_to_rgba(SFColor val);\r
-\r
-/*field types, as defined in BIFS encoding (used for scripts and proto coding)*/\r
-enum\r
-{\r
-       GF_SG_VRML_SFBOOL               =       0,\r
-       GF_SG_VRML_SFFLOAT              =       1,\r
-       GF_SG_VRML_SFTIME               =       2,\r
-       GF_SG_VRML_SFINT32              =       3,\r
-       GF_SG_VRML_SFSTRING             =       4,\r
-       GF_SG_VRML_SFVEC3F              =       5,\r
-       GF_SG_VRML_SFVEC2F              =       6,\r
-       GF_SG_VRML_SFCOLOR              =       7,\r
-       GF_SG_VRML_SFROTATION   =       8,\r
-       GF_SG_VRML_SFIMAGE              =       9,\r
-       GF_SG_VRML_SFNODE               =       10,\r
-       /*TO CHECK*/\r
-       GF_SG_VRML_SFVEC4F              =       11,\r
-\r
-       /*used types in GPAC but not defined in the MPEG4 spec*/\r
-       GF_SG_VRML_SFURL,\r
-       GF_SG_VRML_SFSCRIPT,\r
-       GF_SG_VRML_SFCOMMANDBUFFER,\r
-       /*used types in X3D*/\r
-       GF_SG_VRML_SFDOUBLE,\r
-       GF_SG_VRML_SFCOLORRGBA,\r
-       GF_SG_VRML_SFVEC2D,\r
-       GF_SG_VRML_SFVEC3D,\r
-\r
-       GF_SG_VRML_FIRST_MF             = 32,\r
-       GF_SG_VRML_MFBOOL               = GF_SG_VRML_FIRST_MF,\r
-       GF_SG_VRML_MFFLOAT,\r
-       GF_SG_VRML_MFTIME,\r
-       GF_SG_VRML_MFINT32,\r
-       GF_SG_VRML_MFSTRING,\r
-       GF_SG_VRML_MFVEC3F,\r
-       GF_SG_VRML_MFVEC2F,\r
-       GF_SG_VRML_MFCOLOR,\r
-       GF_SG_VRML_MFROTATION,\r
-       GF_SG_VRML_MFIMAGE,\r
-       GF_SG_VRML_MFNODE,\r
-       GF_SG_VRML_MFVEC4F,\r
-\r
-       /*used types in GPAC but not defined in the MPEG4 spec*/\r
-       GF_SG_VRML_MFURL,\r
-       GF_SG_VRML_MFSCRIPT,\r
-\r
-       /*used types in X3D*/\r
-       GF_SG_VRML_MFDOUBLE,\r
-       GF_SG_VRML_MFCOLORRGBA,\r
-       GF_SG_VRML_MFVEC2D,\r
-       GF_SG_VRML_MFVEC3D,\r
-\r
-       GF_SG_VRML_UNKNOWN\r
-};\r
-const char *gf_sg_vrml_get_field_type_by_name(u32 FieldType);\r
-\r
-\r
-/*\r
-allocates a new field and gets it back. \r
-       NOTE:\r
-                       GF_SG_VRML_MFNODE will return a pointer to a GF_List structure (eg GF_List *)\r
-                       GF_SG_VRML_SFNODE will return NULL\r
-*/\r
-void *gf_sg_vrml_field_pointer_new(u32 FieldType);\r
-/*deletes a field pointer (including SF an,d MF nodes)*/\r
-void gf_sg_vrml_field_pointer_del(void *field, u32 FieldType);\r
-\r
-Bool gf_sg_vrml_is_sf_field(u32 FieldType);\r
-\r
-/*translates MF/SF to SF type*/\r
-u32 gf_sg_vrml_get_sf_type(u32 FieldType);\r
-\r
-\r
-/*\r
-       MFField manipulation  - MFNode cannot use these, use the GF_List functions instead\r
-       or the Node_* insertion functions\r
-       FieldType shall always be given when manipulating MFFields\r
-*/\r
-/*Insert (+alloc) a slot in the MFField with a specified position for insertion and sets the ptr\r
-to the newly created slot\r
-@InsertAt is the 0-based index for the new slot\r
-*/\r
-GF_Err gf_sg_vrml_mf_insert(void *mf, u32 FieldType, void **new_ptr, u32 InsertAt);\r
-/*adds at the end and gets the ptr*/\r
-GF_Err gf_sg_vrml_mf_append(void *mf, u32 FieldType, void **new_ptr);\r
-/*remove the desired item*/\r
-GF_Err gf_sg_vrml_mf_remove(void *mf, u32 FieldType, u32 RemoveFrom);\r
-/*alloc a fixed array*/\r
-GF_Err gf_sg_vrml_mf_alloc(void *mf, u32 FieldType, u32 NbItems);\r
-/*get the item in the array*/\r
-GF_Err gf_sg_vrml_mf_get_item(void *mf, u32 FieldType, void **new_ptr, u32 ItemPos);\r
-/*remove all items of the MFField*/\r
-GF_Err gf_sg_vrml_mf_reset(void *mf, u32 FieldType);\r
-\r
-/*clones a field content EXCEPT SF/MFNode. Pointers to field shall be used\r
-@dest, @orig: pointers to field\r
-@FieldType: type of the field\r
-*/\r
-void gf_sg_vrml_field_copy(void *dest, void *orig, u32 FieldType);\r
-\r
-/*indicates whether 2 fields of same type EXCEPT SF/MFNode are equal\r
-@dest, @orig: pointers to field\r
-@FieldType: type of the field\r
-*/\r
-Bool gf_sg_vrml_field_equal(void *dest, void *orig, u32 FieldType);\r
-\r
-\r
-\r
-/*VRML grouping nodes macro - note we have inverted the children field to be \r
-compatible with the base GF_ParentNode node\r
-All grouping nodes (with "children" field) implement the following: \r
-\r
-addChildren: chain containing nodes to add passed as eventIn - handled internally through ROUTE\r
-void (*on_addChildren)(GF_Node *pNode): add eventIn signaler - this is handled internally by the scene_graph and SHALL \r
-NOT BE OVERRIDEN since it takes care of node(s) routing\r
-\r
-removeChildren: chain containing nodes to remove passed as eventIn - handled internally through ROUTE\r
-\r
-void (*on_removeChildren)(GF_Node *pNode): remove eventIn signaler - this is handled internally by the scene_graph and SHALL \r
-NOT BE OVERRIDEN since it takes care of node(s) routing\r
-\r
-children: list of children SFNodes\r
-*/\r
-\r
-#define VRML_CHILDREN                                                  \\r
-       CHILDREN                                                                        \\r
-       GF_ChildNodeItem *addChildren;                                                  \\r
-       void (*on_addChildren)(GF_Node *pNode);         \\r
-       GF_ChildNodeItem *removeChildren;                                               \\r
-       void (*on_removeChildren)(GF_Node *pNode);              \\r
-\r
-typedef struct\r
-{\r
-       BASE_NODE\r
-       VRML_CHILDREN\r
-} GF_VRMLParent;\r
-\r
-void gf_sg_vrml_parent_setup(GF_Node *pNode);\r
-void gf_sg_vrml_parent_destroy(GF_Node *pNode);\r
-\r
-\r
-/*set proto loader - callback is the same as simulation time callback\r
-       GetExternProtoLib is a pointer to the proto lib loader - this callback shall return the LPSCENEGRAPH\r
-of the extern proto lib if found and loaded, NULL if not found and GF_SG_INTERNAL_PROTO for internal\r
-hardcoded protos (extensions of MPEG-4 scene graph used for module deveopment)\r
-*/\r
-#define GF_SG_INTERNAL_PROTO   (GF_SceneGraph *) 0xFFFFFFFF\r
-\r
-/*GF_Route manip: routes are used to pass events between nodes. Event handling is managed by the scene graph\r
-however only the nodes overloading the EventIn handler associated with the event will process the eventIn*/\r
-typedef struct _route GF_Route;\r
-\r
-/*creates a new route:\r
-       @fromNode: @fromField: address of the eventOut field triggering the route\r
-       @toNode: @toField: address of the destination eventIn field\r
-NOTE: routes are automatically destroyed if either the target or origin node of the route is destroyed\r
-*/\r
-GF_Route *gf_sg_route_new(GF_SceneGraph *sg, GF_Node *fromNode, u32 fromField, GF_Node *toNode, u32 toField);\r
-\r
-/*delete route*/\r
-void gf_sg_route_del(GF_Route *route);\r
-GF_Err gf_sg_route_del_by_id(GF_SceneGraph *sg,u32 routeID);\r
-\r
-/*locate route by ID/name*/\r
-GF_Route *gf_sg_route_find(GF_SceneGraph *sg, u32 RouteID);\r
-GF_Route *gf_sg_route_find_by_name(GF_SceneGraph *sg, char *name);\r
-/*assign route ID - fails if a route with same ID already exist*/\r
-GF_Err gf_sg_route_set_id(GF_Route *route, u32 ID);\r
-u32 gf_sg_route_get_id(GF_Route *route);\r
-/*assign route name if desired*/\r
-GF_Err gf_sg_route_set_name(GF_Route *route, char *name);\r
-char *gf_sg_route_get_name(GF_Route *route);\r
-\r
-/*retuns next available RouteID - Note this doesn't track inserted routes, that's the user responsability*/\r
-u32 gf_sg_get_next_available_route_id(GF_SceneGraph *sg);\r
-/*set max defined route ID used in the scene - used to handle RouteInsert commands\r
-note that this must be called by the user to be effective,; otherwise the max route ID is computed\r
-from the routes present in scene*/\r
-void gf_sg_set_max_defined_route_id(GF_SceneGraph *sg, u32 ID);\r
-\r
-\r
-/*activates all routes currently triggered - this follows the event cascade model of VRML/MPEG4:\r
-       - routes are collected during eventOut generation\r
-       - routes are activated. If eventOuts are generated during activation the cycle goes on.\r
-\r
-  A route cannot be activated twice in the same simulation tick, hence this function shall be called \r
-  ONCE AND ONLY ONCE per simulation tick\r
-\r
-Note that children scene graphs register their routes with the top-level graph, so only the main \r
-scene graph needs to be activated*/\r
-void gf_sg_activate_routes(GF_SceneGraph *sg);\r
-\r
-\r
-/*\r
-                               proto handling\r
-\r
-       The lib allows you to construct prototype nodes as defined in VRML/MPEG4 by constructing \r
-       proto interfaces and instanciating them. An instanciated proto is handled as a single node for\r
-       rendering, thus an application will never handle proto instances for rendering\r
-*/\r
-\r
-/*opaque handler for a proto object (declaration)*/\r
-typedef struct _proto GF_Proto;\r
-/*opaque handler for a proto field object (declaration)*/\r
-typedef struct _protofield GF_ProtoFieldInterface;\r
-\r
-\r
-/*retuns next available NodeID*/\r
-u32 gf_sg_get_next_available_proto_id(GF_SceneGraph *sg);\r
-\r
-/*proto constructor identified by ID/name in the given scene\r
-2 protos in the same scene may not have the same ID/name\r
-\r
-@unregistered: used for memory handling of scene graph only, the proto is not stored\r
-in the graph main proto list but in an alternate list. Several protos with the same ID/Name can be stored unregistered\r
-*/\r
-GF_Proto *gf_sg_proto_new(GF_SceneGraph *inScene, u32 ProtoID, char *name, Bool unregistered);\r
-\r
-/*destroy proto interface - can be used even if instances of the proto are still present*/\r
-GF_Err gf_sg_proto_del(GF_Proto *proto);\r
-\r
-/*used for memory handling of scene graph only. move proto from off-graph to in-graph or reverse*/\r
-GF_Err gf_sg_proto_set_in_graph(GF_Proto *proto, GF_SceneGraph *inScene, Bool set_in);\r
-\r
-/*returns graph associated with this proto. Such a graph cannot be used for rendering but is needed during\r
-construction of proto dictionaries in case of nested protos*/\r
-GF_SceneGraph *gf_sg_proto_get_graph(GF_Proto *proto);\r
-\r
-/*get/set private data*/\r
-void gf_sg_proto_set_private(GF_Proto *proto, void *ptr, void (*OnDelete)(void *ptr) );\r
-void *gf_sg_proto_get_private(GF_Proto *proto);\r
-\r
-/*add node code - a proto is build of several nodes, the first node is used for rendering\r
-and the others are kept private. This set of nodes is refered to as the proto "node code"*/\r
-GF_Err gf_sg_proto_add_node_code(GF_Proto *proto, GF_Node *pNode);\r
-\r
-/*gets number of field in the proto interface*/\r
-u32 gf_sg_proto_get_field_count(GF_Proto *proto);\r
-/*locates field declaration by name*/\r
-GF_ProtoFieldInterface *gf_sg_proto_field_find_by_name(GF_Proto *proto, char *fieldName);\r
-/*locates field declaration by index (0-based)*/\r
-GF_ProtoFieldInterface *gf_sg_proto_field_find(GF_Proto *proto, u32 fieldIndex);\r
-\r
-/*creates a new field declaration in the proto. of given fieldtype and eventType\r
-fieldName can be NULL, if so the name will be fieldN, N being the index of the created field*/\r
-GF_ProtoFieldInterface *gf_sg_proto_field_new(GF_Proto *proto, u32 fieldType, u32 eventType, char *fieldName);\r
-\r
-/*assign the node field to a field of the proto (the node field IS the proto field)\r
-the node shall be a node of the proto scenegraph, and the fieldtype/eventType of both fields shall match\r
-(except SF/MFString and MF/SFURL which are allowed) due to BIFS semantics*/\r
-GF_Err gf_sg_proto_field_set_ised(GF_Proto *proto, u32 protoFieldIndex, GF_Node *node, u32 nodeFieldIndex);\r
-/*set/get user private data for the proto field declaration*/\r
-void gf_sg_proto_field_set_private(GF_ProtoFieldInterface *field, void *ptr, void (*OnDelete)(void *ptr) );\r
-void *gf_sg_proto_field_get_private(GF_ProtoFieldInterface *field);\r
-/*returns field info of the field - this is typically used to setup the default value of the field*/\r
-GF_Err gf_sg_proto_field_get_field(GF_ProtoFieldInterface *field, GF_FieldInfo *info);\r
-\r
-/*\r
-       NOTE on proto instances:\r
-               The proto instance is handled as an GF_Node outside the scenegraph lib, and is manipulated with the same functions \r
-               as an GF_Node \r
-               The proto instance may or may not be loaded. \r
-               An unloaded instance only contains the proto instance fields \r
-               A loaded instance contains the proto instance fields plus all the proto code (Nodes, routes) and \r
-               will load any scripts present in it. This allows keeping the memory usage of proto very low, especially\r
-               when nested protos (protos used as building blocks of their parent proto) are used.\r
-*/\r
-\r
-/*creates the proto interface without the proto code.*/\r
-GF_Node *gf_sg_proto_create_instance(GF_SceneGraph *sg, GF_Proto *proto);\r
-\r
-/*lodes code in this instance - all subprotos are automatically created, thus you must only instanciate\r
-top-level protos. VRML/BIFS doesn't allow for non top-level proto instanciation in the main graph\r
-All nodes created in this proto will be forwarded to the app for initialization*/\r
-GF_Err gf_sg_proto_load_code(GF_Node *proto_inst);\r
-\r
-/*locate a prototype definition by ID or by name. when looking by name, ID is ignored*/\r
-GF_Proto *gf_sg_find_proto(GF_SceneGraph *sg, u32 ProtoID, char *name);\r
-\r
-/*deletes all protos in given scene - does NOT delete instances of protos, only the proto object is destroyed */\r
-GF_Err gf_sg_delete_all_protos(GF_SceneGraph *scene);\r
-\r
-\r
-/*tools for hardcoded proto*/\r
-/*gets proto of this node - if the node is not a prototype instance, returns NULL*/\r
-GF_Proto *gf_node_get_proto(GF_Node *node);\r
-/*returns the ID of the proto*/\r
-u32 gf_sg_proto_get_id(GF_Proto *proto);\r
-/*returns proto name*/\r
-const char *gf_sg_proto_get_class_name(GF_Proto *proto);\r
-\r
-/*Returns 1 if the given field is ISed to a startTime/stopTime field (MPEG-4 specific for updates)*/\r
-Bool gf_sg_proto_field_is_sftime_offset(GF_Node *node, GF_FieldInfo *field);\r
-\r
-/*set an ISed field in a proto instance (not a proto) - this is needed with dynamic node creation inside a proto\r
-instance (conditionals)*/\r
-GF_Err gf_sg_proto_instance_set_ised(GF_Node *protoinst, u32 protoFieldIndex, GF_Node *node, u32 nodeFieldIndex);\r
-\r
-/*returns root node (the one and only one being traversed) of this proto instance if any*/\r
-GF_Node *gf_node_get_proto_root(GF_Node *node);\r
-\r
-/*returns parent ProtoInstance node if this node is in a proto*/\r
-GF_Node *gf_node_get_proto_parent(GF_Node *node);\r
-\r
-/*indicates proto field has been parsed and its value is valid - this is needed for externProtos not specifying default\r
-values*/\r
-void gf_sg_proto_mark_field_loaded(GF_Node *proto_inst, GF_FieldInfo *info);\r
-\r
-/*\r
-                       JavaScript tools\r
-*/\r
-\r
-/*script fields type don't have the same value as the bifs ones...*/\r
-enum\r
-{\r
-       GF_SG_SCRIPT_TYPE_FIELD = 0,\r
-       GF_SG_SCRIPT_TYPE_EVENT_IN,\r
-       GF_SG_SCRIPT_TYPE_EVENT_OUT,\r
-};\r
-\r
-typedef struct _scriptfield GF_ScriptField;\r
-/*creates new sript field - script fields are dynamically added to the node, and thus can be accessed through the\r
-same functions as other GF_Node fields*/\r
-GF_ScriptField *gf_sg_script_field_new(GF_Node *script, u32 eventType, u32 fieldType, const char *name);\r
-/*retrieves field info, usefull to get the field index*/\r
-GF_Err gf_sg_script_field_get_info(GF_ScriptField *field, GF_FieldInfo *info);\r
-\r
-/*activate eventIn for script node - needed for BIFS field replace*/\r
-void gf_sg_script_event_in(GF_Node *node, GF_FieldInfo *in_field);\r
-\r
-\r
-\r
-/*set the scene proto loader function for externProto - callback is the same as the scene callback*/\r
-void gf_sg_set_proto_loader(GF_SceneGraph *scene, GF_SceneGraph *(*GetExternProtoLib)(void *SceneCallback, MFURL *lib_url));\r
-\r
-/*get a pointer to the MF URL field for externProto info - DO NOT TOUCH THIS FIELD*/\r
-MFURL *gf_sg_proto_get_extern_url(GF_Proto *proto);\r
-\r
-SFRotation gf_sg_sfrotation_interpolate(SFRotation kv1, SFRotation kv2, Fixed fraction);\r
-\r
-\r
-\r
-\r
-/*adds a new node to the "children" field\r
-position is the 0-BASED index in the list of children, -1 means end of list (append)\r
-DOES NOT CHECK CHILD/PARENT type compatibility\r
-*/\r
-GF_Err gf_node_insert_child(GF_Node *parent, GF_Node *new_child, s32 Position);\r
-/*removes an existing node from the "children" field*/\r
-GF_Err gf_node_remove_child(GF_Node *parent, GF_Node *toremove_child);\r
-/*remove and replace given child by specified node. If node is NULL, only delete target node\r
-position is the 0-BASED index in the list of children, -1 means end of list (append)\r
-DOES NOT CHECK CHILD/PARENT type compatibility\r
-*/\r
-GF_Err gf_node_replace_child(GF_Node *node, GF_ChildNodeItem **container, s32 pos, GF_Node *newNode);\r
-\r
-/*signals eventOut has been set. FieldIndex/eventName identify the eventOut field. Routes are automatically triggered\r
-when the event is signaled*/\r
-void gf_node_event_out(GF_Node *node, u32 FieldIndex);\r
-void gf_node_event_out_str(GF_Node *node, const char *eventName);\r
-\r
-\r
-/*exported for parsers*/\r
-u32 gf_node_mpeg4_type_by_class_name(const char *node_name);\r
-u32 gf_node_x3d_type_by_class_name(const char *node_name);\r
-\r
-/*exported for URL handling in compositor*/\r
-void gf_sg_mfurl_del(MFURL url);\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-\r
-\r
-#endif /*_GF_SG_VRML_H_*/\r