#include <ParticlePlot.h>
|
| | ParticlePlot (const char *title, int width=800, int height=800) |
| |
| virtual | ~ParticlePlot () |
| |
| void | reinitPlotter () |
| |
| void | spawnAsThread () |
| |
| virtual void | draw () |
| |
| void | setData (Matrix &heightValues, double *xPos, double *yPos, particleT *currParticles, const double &refX, const double &refY) |
| |
| void | setDataMapOnly (Matrix &heightValues, double *xPos, double *yPos, const double &refX, const double &refY) |
| |
| void | setMap (Matrix &heightValues, double *xPos, double *yPos) |
| |
| void | setParticles (particleT *currParticles) |
| |
| void | addVehiclePath (const double &x, const double &y) |
| |
| void | addReferencePath (const double &x, const double &y) |
| |
| void | setMapBoundary (const double &minX, const double &maxX, const double &minY, const double &maxY) |
| |
| void | setString (const std::string &str) |
| |
| void | processNormalKeys (unsigned char key, int x, int y) |
| |
| | GlutWindow2d (const char *title, int width=800, int height=800) |
| |
| virtual | ~GlutWindow2d () |
| |
| virtual void | reshape (int w, int h) |
| |
| virtual void | display () |
| |
| virtual void | processSpecialKeys (int key, int x, int y) |
| |
| virtual void | mouse (int button, int state, int x, int y) |
| |
| virtual void | mouseMotion (int x, int y) |
| |
| virtual void | positionCamera () |
| |
| | GlutWindow (const char *title, int width=800, int height=800) |
| |
| virtual | ~GlutWindow () |
| |
| int | getWidth () const |
| |
| int | getHeight () const |
| |
| int | getButton () const |
| |
| virtual void | idle () |
| |
| virtual void | run () |
| |
| void | drawText (const char *txt, float x, float y, float r, float g, float b, void *font) |
| |
| ParticlePlot::ParticlePlot |
( |
const char * |
title, |
|
|
int |
width = 800, |
|
|
int |
height = 800 |
|
) |
| |
| ParticlePlot::~ParticlePlot |
( |
| ) |
|
|
virtual |
| void ParticlePlot::addReferencePath |
( |
const double & |
x, |
|
|
const double & |
y |
|
) |
| |
Appends this x,y onto the reference path
| void ParticlePlot::addVehiclePath |
( |
const double & |
x, |
|
|
const double & |
y |
|
) |
| |
Appends this x,y position onto the vehicle path
| void ParticlePlot::draw |
( |
| ) |
|
|
virtual |
This function is called from the display function automatically.
This function needs to be overriden to draw the scene. This function is called from the display function automatically.
Implements GlutWindow2d.
| void ParticlePlot::drawAxes |
( |
| ) |
|
|
protected |
draws the axes and grid on the screen
| void ParticlePlot::processNormalKeys |
( |
unsigned char |
key, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
|
virtual |
This function is called when an ascii key is pressed.
- Parameters
-
| key | The key that was pressed |
| x | The x location of the cursor when the key was pressed |
| y | The y location of the cursor when the key was pressed |
Reimplemented from GlutWindow2d.
| void ParticlePlot::reinitPlotter |
( |
| ) |
|
Reinitiatlization function
This function reinitializes the plotter by removing all reference data.
| void ParticlePlot::setData |
( |
Matrix & |
heightValues, |
|
|
double * |
xPos, |
|
|
double * |
yPos, |
|
|
particleT * |
currParticles, |
|
|
const double & |
refX, |
|
|
const double & |
refY |
|
) |
| |
sets the map data and the particle data. /param heightValues - the matrix of height values for the position in xPos and yPos /param xPos - the x position of the height values /param yPos - the y position of the height values /param currParticles - a pointer to the current list of particles /param refX - the x position of where to reference the map and particles from /param refY - the y position of where to reference the map and particles from
| void ParticlePlot::setDataMapOnly |
( |
Matrix & |
heightValues, |
|
|
double * |
xPos, |
|
|
double * |
yPos, |
|
|
const double & |
refX, |
|
|
const double & |
refY |
|
) |
| |
| void ParticlePlot::setMap |
( |
Matrix & |
heightValues, |
|
|
double * |
xPos, |
|
|
double * |
yPos |
|
) |
| |
Sets the map and creates the open gl vertices and color lists
| void ParticlePlot::setMapBoundary |
( |
const double & |
minX, |
|
|
const double & |
maxX, |
|
|
const double & |
minY, |
|
|
const double & |
maxY |
|
) |
| |
Set current map boundaries
| void ParticlePlot::setParticles |
( |
particleT * |
currParticles | ) |
|
Copys the particles in the viewer
| void ParticlePlot::setString |
( |
const std::string & |
str | ) |
|
| void ParticlePlot::spawnAsThread |
( |
| ) |
|
This function will spawn the viewer as a separate thread and start the viewer.
| Point2d ParticlePlot::cameraCenterPosition |
|
protected |
if the user wants to follow a position on the screen, this specifies that position
| double* ParticlePlot::colors |
|
protected |
the color of each vertex in the grid
| pthread_mutex_t ParticlePlot::dataLock |
|
protected |
the mutex lock for the data so that the drawer isn't trying to display it while the user is setting it
| std::string ParticlePlot::displayString |
|
protected |
string to display at the bottom of the screen
| bool ParticlePlot::followPositionFlag |
|
protected |
whether or not to follow a position on the screen
| Point2d ParticlePlot::mapBoundaries[4] |
|
protected |
bounding vertices of current search map
coordinates of places to display the text on the screen
| int ParticlePlot::numQuads |
|
protected |
the number of quads in the grid we are trying to display
the particles to display on the screen
| std::vector<Point2d> ParticlePlot::referencePath |
|
protected |
| double ParticlePlot::refX |
|
protected |
current north/east reference point
| double ParticlePlot::refY |
|
protected |
the size of the vertices and color arrays
| std::vector<Point2d> ParticlePlot::vehiclePath |
|
protected |
the following two are two sequences of paths to display on the screen.
| double* ParticlePlot::vertices |
|
protected |
| pthread_t* ParticlePlot::viewerThreadID |
|
protected |
The documentation for this class was generated from the following files: