Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
plumesim::PSSource Class Reference

Base class for all the plume source algorithms. More...

#include <PSSources.h>

Inheritance diagram for plumesim::PSSource:
Inheritance graph
[legend]

List of all members.

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< PSPoint3dplumePoints

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

Detailed Description

Base class for all the plume source algorithms.

Definition at line 123 of file PSSources.h.


Constructor & Destructor Documentation

PSSource constructor.

This is the class constructor.

Definition at line 46 of file PSSource.cpp.

PSSource destructor.

This is the class destructor.

Definition at line 53 of file PSSource.cpp.


Member Function Documentation

If the class is time invariant or not.

Parameters:
none.
Returns:
true - if the plume changes over time
false - otherwise

Definition at line 88 of file PSSource.cpp.

int plumesim::PSSource::cleanup ( ) [virtual]

Virtual function for cleaning up the class.

Parameters:
none.
Returns:
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.

Parameters:
centerThe center of the sphere.
radiusThe radius of the sphere.
Returns:
The number of points found.

Definition at line 116 of file PSSource.cpp.

float plumesim::PSSource::drand ( ) [protected]

Uniform distribution, [0 ... 1].

Parameters:
none.
Returns:
Random generated value.

Definition at line 102 of file PSSource.cpp.

Virtual function for generating plume points.

Parameters:
none.
Returns:
0 - if successful
-1 - otherwise

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.

Parameters:
pointA 3D point containning the current position of the robot.
odor_dataThe odor data structure where the result is written.
Returns:
0 - if successful
-1 - otherwise

Reimplemented in plumesim::PSFluent, plumesim::PSLog, plumesim::PSGaussian, and plumesim::PSMeadering.

Definition at line 81 of file PSSource.cpp.

If the class is still processing data.

Parameters:
none.
Returns:
true - if the plume is still playing
false - otherwise

Definition at line 95 of file PSSource.cpp.

double plumesim::PSSource::randomNormal ( ) [protected]

Normal distribution, centered on 0, std dev 1.

Parameters:
none.
Returns:
Random generated value.

Definition at line 109 of file PSSource.cpp.

int plumesim::PSSource::setup ( ) [virtual]

Virtual function for setting up the class.

Parameters:
none.
Returns:
none.

Reimplemented in plumesim::PSFluent, plumesim::PSLog, plumesim::PSGaussian, and plumesim::PSMeadering.

Definition at line 60 of file PSSource.cpp.


Member Data Documentation

Stores if the plume changes over time or not.

Definition at line 232 of file PSSources.h.

Stores if the plume is playing ot not.

Definition at line 233 of file PSSources.h.

Linked list of plume points to draw.

Definition at line 157 of file PSSources.h.


The documentation for this class was generated from the following files:


plumesim
Author(s): Gonçalo Cabrita and Pedro Sousa
autogenerated on Mon Jan 6 2014 11:27:16