Base class for all the plume source algorithms. More...
#include <PSSources.h>
Public Member Functions | |
bool | ChangesOverTime () |
If the class is time invariant or not. | |
virtual int | cleanup () |
Virtual function for cleaning up the class. | |
virtual int | generatePoints () |
Virtual function for generating plume points. | |
virtual int | getChemicalReading (PSPoint3d *point, PSOdorData *odor_data) |
Virtual function for reading a single chemical point based on the robot current position. | |
bool | IsPlaying () |
If the class is still processing data. | |
PSSource () | |
PSSource constructor. | |
virtual int | setup () |
Virtual function for setting up the class. | |
~PSSource () | |
PSSource destructor. | |
Public Attributes | |
std::vector< PSPoint3d > | plumePoints |
Protected Member Functions | |
int | countPoints (PSPoint3d *center, double radius) |
Counts the plume points inside a sphere. | |
float | drand () |
Uniform distribution, [0 ... 1]. | |
double | randomNormal () |
Normal distribution, centered on 0, std dev 1. | |
Protected Attributes | |
bool | changesOverTime |
bool | isPlaying |
Base class for all the plume source algorithms.
Definition at line 123 of file PSSources.h.
bool plumesim::PSSource::ChangesOverTime | ( | ) |
If the class is time invariant or not.
none. |
Definition at line 88 of file PSSource.cpp.
int plumesim::PSSource::cleanup | ( | ) | [virtual] |
Virtual function for cleaning up the class.
none. |
Reimplemented in plumesim::PSFluent, plumesim::PSLog, plumesim::PSGaussian, and plumesim::PSMeadering.
Definition at line 67 of file PSSource.cpp.
int plumesim::PSSource::countPoints | ( | PSPoint3d * | center, |
double | radius | ||
) | [protected] |
Counts the plume points inside a sphere.
center | The center of the sphere. |
radius | The radius of the sphere. |
Definition at line 116 of file PSSource.cpp.
float plumesim::PSSource::drand | ( | ) | [protected] |
Uniform distribution, [0 ... 1].
none. |
Definition at line 102 of file PSSource.cpp.
int plumesim::PSSource::generatePoints | ( | ) | [virtual] |
Virtual function for generating plume points.
none. |
Reimplemented in plumesim::PSFluent, plumesim::PSLog, plumesim::PSGaussian, and plumesim::PSMeadering.
Definition at line 74 of file PSSource.cpp.
int plumesim::PSSource::getChemicalReading | ( | PSPoint3d * | point, |
PSOdorData * | odor_data | ||
) | [virtual] |
Virtual function for reading a single chemical point based on the robot current position.
point | A 3D point containning the current position of the robot. |
odor_data | The odor data structure where the result is written. |
Reimplemented in plumesim::PSFluent, plumesim::PSLog, plumesim::PSGaussian, and plumesim::PSMeadering.
Definition at line 81 of file PSSource.cpp.
bool plumesim::PSSource::IsPlaying | ( | ) |
If the class is still processing data.
none. |
Definition at line 95 of file PSSource.cpp.
double plumesim::PSSource::randomNormal | ( | ) | [protected] |
Normal distribution, centered on 0, std dev 1.
none. |
Definition at line 109 of file PSSource.cpp.
int plumesim::PSSource::setup | ( | ) | [virtual] |
Virtual function for setting up the class.
none. |
Reimplemented in plumesim::PSFluent, plumesim::PSLog, plumesim::PSGaussian, and plumesim::PSMeadering.
Definition at line 60 of file PSSource.cpp.
bool plumesim::PSSource::changesOverTime [protected] |
Stores if the plume changes over time or not.
Definition at line 232 of file PSSources.h.
bool plumesim::PSSource::isPlaying [protected] |
Stores if the plume is playing ot not.
Definition at line 233 of file PSSources.h.
std::vector<PSPoint3d> plumesim::PSSource::plumePoints |
Linked list of plume points to draw.
Definition at line 157 of file PSSources.h.