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

LsgNode Struct Reference

Scene graph hierarchy base class. More...

#include <node.h>

Collaboration diagram for LsgNode:

Collaboration graph
[legend]

Data Fields

LsgObject super
LsgBBoxbbox
int dirty
void(* clean )(LsgNode *self)
void(* update )(LsgNode *self, float now)
void(* display )(LsgNode *self, LsgFrustum *frustum)
int(* collide )(LsgNode *self, Vertex v, Vertex nearest)

Related Functions

(Note that these are not member 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.

Abstract base class for the scene graph class hierarchy.


Friends And Related Function Documentation

void LsgNode_init LsgNode self  )  [related]
 

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  )  [related]
 

Clean the node by unsetting the dirty flag.

Parameters:
self The instance variable

void LsgNode_update LsgNode self,
float  now
[related]
 

Update the node. Does nothing at all.

Parameters:
self The instance variable

void LsgNode_display LsgNode self,
LsgFrustum frustum
[related]
 

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
[related]
 

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  )  [related]
 

Destructor for LsgNode. Destroy the bounding box.

Parameters:
self The instance variable


Field Documentation

int LsgNode::dirty
 

Flag to indicate a changed boundig box. Parents should check this flag after calling update and update their own bounding boxes if necessary.

void(* LsgNode::clean)(LsgNode* self)
 

Mark this node as having any changes processed. Call after running update to ensure later calls to update don't have process to reevaluate unchanged nodes.

Parameters:
self The instance variable

void(* LsgNode::update)(LsgNode* self, float now)
 

Update this node to accommodate to passingtime.

Parameters:
self The instance variable
now The current time

void(* LsgNode::display)(LsgNode* self, LsgFrustum* frustum)
 

Display this node.

Parameters:
self The instance variable
frustum The viewing frustum transformed to the local coordinate system

int(* LsgNode::collide)(LsgNode* self, Vertex v, Vertex nearest)
 

Check for collision and calculate nearest vertex if asked for.

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:
1 if the vertex v collides with the node, 0 otherwise


The documentation for this struct was generated from the following file:
(c) 2003, by Enno Cramer
generated on 13 Jul 2003
lescegra - doxygen