#include <src/Obstacle.h>
Inheritance diagram for Obstacle:
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.
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 | |
TranslateTransform * | transform |
double | radius |
|
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 |
|
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. |
|
Returns the osg Node for this obstacle. Translation of the agent's avatar at its position. |
|
Returns the osg Node radius for this obstacle. commodity for avoiding recomputing from obstacle's node each step |