Classes | |
struct | EventFusionnedText |
GRRRRRRRRRRRRRRRRRR!!!!! OSG didn't make setText virtual!!! More... | |
class | KeyboardEventHandler |
struct | FileLogger |
struct | BatchThread |
Enumerations | |
enum | TextHUDPosition { TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT } |
For use in createTextHUD method. | |
Functions | |
EventQueueViewer * | createViewer (const char *windowTitle) |
Creates the viewer. Fills the Environment viewer field too. | |
osg::Group * | drawLine (osg::Vec3d p1, osg::Vec3d p2, osg::Vec4 c1, osg::Group *lineGroup) |
Create a line between the 2 points with the given end colors, and add it to the given group. | |
osg::Group * | drawLine (osg::Vec3d p1, osg::Vec3d p2, osg::Vec4 c1, osg::Vec4 c2, osg::Group *lineGroup) |
static void | addSceneHelper (osg::Projection *p) |
static EventFusionnedText * | getTextHUD (TextHUDPosition where) |
void | setStatus (const std::string &status, TextHUDPosition where, bool alsoOut) |
Display some status text. | |
void | checkTime () |
void | displayTime () |
void | toggleSimulationTime () |
Show or hides the time. | |
void | resetView () |
reset position of the viewer to it's initial position | |
void | createKeyboardHandler (osg::Group *tileableNode, osg::Group *tileableParent) |
Creates a keyboard handler for use in the main program. | |
static TRandomMersenne * | getRNG () |
long | RandomInit () |
void | RandomInit (long seed) |
Initialize the random number generator with the given seed. | |
int | IRandom (int min, int max) |
Returns a random integer in the range [min, max], bounds included: min <= x <= max, from a uniform distribution. | |
double | Random () |
Returns a random number between 0 (included) and 1 (excluded) 0 <= x < 1 drawn from a uniform distribution. | |
long | BRandom () |
Return 32 random bits as a long. | |
double | NRandom () |
Utility to get a number from a Normal distribution with mean 0, variance 1. | |
Logger * | createLogger (const std::string &id, const std::vector< std::string > &names) |
Creates a Logger. | |
void | mainLoop () |
main program loop. Handles both simulator and OSG, both batch and graphics modes | |
Variables | |
osgGA::TrackballManipulator * | trackBallManipulator = 0 |
static osg::Geode * | topHUD = 0 |
static osg::Geode * | bottomHUD = 0 |
static EventFusionnedText * | topLeftText = 0 |
static EventFusionnedText * | topRightText = 0 |
static EventFusionnedText * | bottomLeftText = 0 |
static EventFusionnedText * | bottomRightText = 0 |
bool | statusToConsole = false |
Set this to true if you also want status messages sent to cout on graphics mode. | |
bool | statusTimeStamped = false |
Set this to true if you also want timestamp each message by prefixing it by "t=XXX: " where XXX is the simulator time at which the message was emitted. | |
static bool | firstTime = true |
static double | sysTimeOri = 0.0 |
static double | simTimeOri = 0.0 |
static const Simulator::GenericDispatcher * | checkTimeEvent = 0 |
static const Simulator::GenericDispatcher * | displayTimeEvent = 0 |
static TRandomMersenne * | rng = 0 |
static long | randomSeed = 42 |
|
Creates a keyboard handler for use in the main program. Right now, this is only supported in graphics mode. This function has no effect in batch mode, or if the viewer isn't initialized yet. It adds the following keys to the current viewer:
|
|
Create a line between the 2 points with the given end colors, and add it to the given group. Returns the group, a new one is created if the argument is null.
|
|
Returns a random integer in the range [min, max], bounds included: min <= x <= max, from a uniform distribution. See comments in RandomInit. |
|
Utility to get a number from a Normal distribution with mean 0, variance 1. Added to the other functions for this project |
|
Returns a random number between 0 (included) and 1 (excluded) 0 <= x < 1 drawn from a uniform distribution. See comments in RandomInit. For the Mersene twister there is 32 random bits in the returned number. |
|
Initialize the random number generator with the given seed. By default, the seed is taken from system time and printed out so the experiment is reproducible. You can set here a previous seed to reproduce it. This interface allows independance from the actual RNG used, and/or system functions. The RNG used is very precisely the Mersenne twister implementation by Agner Fog, released under GNU GPL at http://www.agner.org/random/randomc.htm. See also Utility.cpp and mersenne.cpp for information. |
|
Display some status text. Creates a text HUD if necessary |
|
Set this to true if you also want timestamp each message by prefixing it by "t=XXX: " where XXX is the simulator time at which the message was emitted. Default is false. |
|
Set this to true if you also want status messages sent to cout on graphics mode. Default is false. |