Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

vp_vrmltree.c File Reference


Detailed Description

This file provide some functions for the creation and the exploration of the vrml scene tree.

Author:
Sandro Bonazzola
Version:
1.0


Functions

int tree_init ()
 Initializes VRML Scene root.

int addchild (node *parent, node *children)
 Adds a child to a node.

nodemknode ()
 Creates an empty node.

nodegetsymFromRoot (char *identifier)
 Search the scene for an identifier.

nodegetsym (char *identifier, node *context)
 Search the scene for an identifier into the given context.

nodelastin (node *begin)
 Gives the latest added node for the current context.

int cleanup (node *context)
 Frees allocated memory for the given context.

int cleanup_tree (void)
 cleanup the entire tree.

nodegetInline (node *context)
 Search the scene for an Inline node.

nodegenUse (node *def)
 Generates a USE Node.


Variables

nodevp_root
 a reference to the external vp_root node.


Function Documentation

int addchild node parent,
node children
 

Adds a child to a node.

Returns:
the number of brothers.
Parameters:
parent the node where add the child
children the node whom has to be added.

int cleanup node context  ) 
 

Frees allocated memory for the given context.

Note that this function is still in beta testing. It may cause a segfault if used over unchecked tree.

Parameters:
context the root node of the branch that must be freed.
Returns:
1 if no error occurred.

int cleanup_tree void   ) 
 

cleanup the entire tree.

Returns:
1 if no error occurred.
See also:
cleanup

Here is the call graph for this function:

node* genUse node def  ) 
 

Generates a USE Node.

The USE node is created generating a new node with the same fields of the given node.

Parameters:
def the source node.
Returns:
a use instance of the given node.

Here is the call graph for this function:

node* getInline node context  ) 
 

Search the scene for an Inline node.

Parameters:
context the actual context.
Returns:
the first matching found. NULL if not found.

node* getsym char *  identifier,
node context
 

Search the scene for an identifier into the given context.

Parameters:
identifier the identifier to search.
context the context where to search the given identifier.
Returns:
the first matching found. NULL if not found.

node* getsymFromRoot char *  identifier  ) 
 

Search the scene for an identifier.

Parameters:
identifier the identifier to search.
Returns:
the first matching found. NULL if not found.

Here is the call graph for this function:

node* lastin node begin  ) 
 

Gives the latest added node for the current context.

Returns:
the last child of the given context, NULL if the context is invalid.
Parameters:
begin the context node

node* mknode void   ) 
 

Creates an empty node.

Returns:
an empty node.

int tree_init void   ) 
 

Initializes VRML Scene root.

Returns:
1 if no error occurred.

Here is the call graph for this function:


Variable Documentation

node* vp_root
 

a reference to the external vp_root node.


SourceForge.net Logo

Generated on Mon Jun 14 17:25:56 2004 for D.R.I.V.E. by doxygen 1.3.7