Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
jafar::lgl::VisibilityMap Class Reference

}}} More...


Detailed Description

}}}

Definition of VisibleAreaClass

Contain the visibility map ( matrix of visible Area).

Definition at line 113 of file VisibilityMap.hpp.

#include <VisibilityMap.hpp>

List of all members.

Public Member Functions

 VisibilityMap ()
 Constructor.
 VisibilityMap (GeoData *_pt_Geodata=NULL, int _viewLength=DEFAULT_VIEW_LENGTH, double _sensorsHeight=DEFAULT_SENSORS_HEIGHT, int _maxHeight=DEFAULT_MAX_HEIGHT)
 }}}
 ~VisibilityMap ()
 Destructor.
bool computeWholeVisibility ()
 Compute the visibility relationships for the current Geodata Visibility is computed for the whole map.
bool clearVisibility ()
 Clear the memory (especially the visibilityMap)
bool computePartialVisibility (std::map< Cell_ID, VisibleArea > &partialVisibilityMap, const std::set< Cell_ID > &cellSet)
 Compute the visibility relationships for the current Geodata Visibility is computed for a part of the map, given as argument (set of Cell_ID) and return the result within the std::map given as argument.
bool computeVisibilityOnDemand (std::map< Cell_ID, VisibleArea > &partialVisibilityMap, const std::set< Cell_ID > &cellSet)
 Similar to "computePartialVisibility", except that it avoids redundancy in computation : it keeps in memory all what have been already computed.
bool computeVisibilityOnDemand (std::map< Cell_ID, const VisibleArea * > &partialVisibilityMap, const std::set< Cell_ID > &cellSet)
VisibleArea getVisibility (int i, int j) const
 Get functions.
const VisibleAreagetPtVisibility (int i, int j) const
const VisibleAreagetPtVisibilityOnDemand (Cell_ID cell)
bool getPrecomputedVisibility (std::map< Cell_ID, VisibleArea > &partialVisibilityMap, const std::set< Cell_ID > &cellSet)
bool getPrecomputedVisibility (std::map< Cell_ID, const VisibleArea * > &partialVisibilityMap, const std::set< Cell_ID > &cellSet)
bool isVisible (const Cell_ID cell) const
int getxsize () const
int getysize () const
int getviewLength () const
int getn () const
double getalpha () const

Private Member Functions

void computePattern ()
 Compute the exploration pattern used to compute visibility, based on the given viewLength)
void findVisibleCells (const int i, const int j, std::vector< RasterCellIndex > &cellList, std::vector< double > &raysRatio)
 Find the cells which are visible from (i,j) in geodata (especially the VisibilityBand)
PatternPoint computeCurrentPoint (const int i, const int j)
 find the attributes of the pattern point (+i,+j) for the rays step alpha
double computeAngle (const int i, const int j)
 Compute the angle of a given point.
double computeDistance (const int i1, const int j1, const int i2, const int j2, const int i3, const int j3, const double a3, const int r)
 Compute the distance between (0,0) and the intersection of a given ray (r, alpha) and a cell (i1,j1,i2,j2,i3,j3) ; use while computing the pattern.
bool findIntersection (double &x, double &y, const int i1, const int j1, const int i2, const int j2, const double angle)
 find the intersection (x,y) of a segment (i1,j1,i2,j2) and a half-line (angle)

Private Attributes

GeoDatapt_Geodata
 {{{
int viewLength
double sensorsHeight
int maxHeight
unsigned long int xsize
unsigned long int ysize
std::vector< VisibleAreavisibilityMap
std::vector< PatternPointcurrentPattern
std::vector< std::pair< bool,
VisibleArea > > 
od_visibilityMap
int n
double alpha

Constructor & Destructor Documentation

Constructor.

{{{

Definition at line 184 of file VisibilityMap.hpp.

jafar::lgl::VisibilityMap::VisibilityMap ( GeoData _pt_Geodata = NULL,
int  _viewLength = DEFAULT_VIEW_LENGTH,
double  _sensorsHeight = DEFAULT_SENSORS_HEIGHT,
int  _maxHeight = DEFAULT_MAX_HEIGHT 
)

}}}

Constructor


Member Function Documentation

bool jafar::lgl::VisibilityMap::computePartialVisibility ( std::map< Cell_ID, VisibleArea > &  partialVisibilityMap,
const std::set< Cell_ID > &  cellSet 
)

Compute the visibility relationships for the current Geodata Visibility is computed for a part of the map, given as argument (set of Cell_ID) and return the result within the std::map given as argument.

NB: it will first clear the std::map and then add content...

Compute the exploration pattern used to compute visibility, based on the given viewLength)

the pattern consists of a list of PatternPoints. n is the number of rays.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:42 for Jafar by doxygen 1.7.6.1
LAAS-CNRS