Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | Namespace Members | Class Members

Obstacle Class Reference

#include <src/Obstacle.h>

Inheritance diagram for Obstacle:

Inheritance graph
[legend]
Collaboration diagram for Obstacle:

Collaboration graph
[legend]
List of all members.

Detailed Description

Obstacle is a Localized Object with fixed position.

If using Bricks and a locality DB, it shold be created before the obstacles. The obstacles automatically add themselves in the DB at their position if it is in use.

Its avatar should be built once and inserted in the scene graph, and cannot move later on.

Author:
Nicolas Brodu


Public Member Functions

 Obstacle (const osg::Vec3d &pos)
 Obstacle (const double &x, const double &y, const double &z)
virtual void addAvatarToGroup (osg::Group *group, bool delayToNextFrame=false)
 Add this obstacle avatar to the scene graph.
osg::Node * getNode ()
 Returns the osg Node for this obstacle.
double getRadius ()
 Returns the osg Node radius for this obstacle.
virtual void updateNeighbors (double radius)
 Artifact for schedulable method: void return type.

Protected Member Functions

virtual osg::Node * buildAvatar ()
 Build this agent avatar.

Protected Attributes

TranslateTransformtransform
double radius


Member Function Documentation

void Obstacle::addAvatarToGroup osg::Group *  group,
bool  delayToNextFrame = false
[virtual]
 

Add this obstacle avatar to the scene graph.

External API. Subclasses should override buildAvatar and position their model at 0,0,0 with the correct orientation.

A translation transform is inserted to handle positioning in this higher-level class

Warning: caller responsibility to call this function at the right moment. the delay parameter may be used to postpone addition of the avatar to the next viewer update

osg::Node * Obstacle::buildAvatar  )  [protected, virtual]
 

Build this agent avatar.

Default is a white sphere of radius 1. For subclasses to override, the model should be created at 0,0,0 with the correct orientation.

Reimplemented in BillboardObstacle.

osg::Node* Obstacle::getNode  )  [inline]
 

Returns the osg Node for this obstacle.

Translation of the agent's avatar at its position.

double Obstacle::getRadius  )  [inline]
 

Returns the osg Node radius for this obstacle.

commodity for avoiding recomputing from obstacle's node each step


The documentation for this class was generated from the following files:
Generated on Mon Mar 28 11:27:34 2005 for Crogai by  doxygen 1.4.1