Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

node.h File Reference

Scene graph hierarchy base class. More...

#include <lescegra/util/object.h>
#include <lescegra/util/vertex.h>
#include <lescegra/util/frustum.h>
#include <lescegra/util/bbox.h>

Include dependency graph for node.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  LsgNode
 Scene graph hierarchy base class. More...


Defines

#define LSG_NODE_H   1

Typedefs

typedef LsgNode LsgNode

Functions

void LsgNode_init (LsgNode *self)
void LsgNode_clean (LsgNode *self)
void LsgNode_update (LsgNode *self, float now)
void LsgNode_display (LsgNode *self, LsgFrustum *frustum)
int LsgNode_collide (LsgNode *self, Vertex v, Vertex nearest)
void LsgNode_destroy (LsgNode *self)


Detailed Description

Scene graph hierarchy base class.


Function Documentation

void LsgNode_init LsgNode self  ) 
 

Constructor for LsgNode. Initially clear the bounding box and set the dirty flag to make the first call to update recompute the complete bounding box tree.

Parameters:
self The instance variable

void LsgNode_clean LsgNode self  ) 
 

Clean the node by unsetting the dirty flag.

Parameters:
self The instance variable

void LsgNode_update LsgNode self,
float  now
 

Update the node. Does nothing at all.

Parameters:
self The instance variable

void LsgNode_display LsgNode self,
LsgFrustum frustum
 

Display this node. Does nothing at all.

Parameters:
self The instance variable
frustum The view frustum transformed to the local coordinat system

int LsgNode_collide LsgNode self,
Vertex  v,
Vertex  nearest
 

Check collision with this node. Delegate collision detection to bounding box if it is valid. Otherwise always return 0. The value of nearest is not defined if the bounding box is not valid.

Parameters:
self The instance variable
v Some vertex
nearest The buffer to store the vertex nearest to v that would cause a collision. May be NULL to indicate that the computation is not neccessary.
Returns:
0 if bounding box is not valid, otherwise the return value of bbox_collide with the same vertex.

void LsgNode_destroy LsgNode self  ) 
 

Destructor for LsgNode. Destroy the bounding box.

Parameters:
self The instance variable


(c) 2003, by Enno Cramer
generated on 9 Jul 2003
lescegra - doxygen