#include <mrpt/opengl/CAngularObservationMesh.h>
Classes | |
class | FTrace1D |
Internal functor class to trace a ray. More... | |
class | FTrace2D |
Internal functor class to trace a set of rays. More... | |
struct | TDoubleRange |
Range specification type, with several uses. More... | |
Public Member Functions | |
bool | isWireframe () const |
Returns whether the object is configured as wireframe or solid. | |
void | setWireframe (bool enabled=true) |
Sets the display mode for the object. | |
bool | isTransparencyEnabled () const |
Returns whether the object may be transparent or not. | |
void | enableTransparency (bool enabled=true) |
Enables or disables transparencies. | |
virtual void | render () const |
Renderizes the object. | |
virtual bool | traceRay (const mrpt::poses::CPose3D &o, double &dist) const |
Traces a ray to the object, returning the distance to a given pose through its X axis. | |
void | setPitchBounds (const double initial, const double final) |
Sets the pitch bounds for this range. | |
void | setPitchBounds (const std::vector< double > bounds) |
Sets the pitch bounds for this range. | |
void | getPitchBounds (double &initial, double &final) const |
Gets the initial and final pitch bounds for this range. | |
void | getPitchBounds (std::vector< double > &bounds) const |
Gets the pitch bounds for this range. | |
void | getScanSet (std::vector< CObservation2DRangeScan > &scans) const |
Gets the scan set. | |
bool | setScanSet (const std::vector< CObservation2DRangeScan > &scans) |
Sets the scan set. | |
void | generateSetOfTriangles (CSetOfTrianglesPtr &res) const |
Gets the mesh as a set of triangles, for displaying them. | |
void | generatePointCloud (CPointsMap *out_map) const |
Returns the scanned points as a 3D point cloud. | |
void | getTracedRays (CSetOfLinesPtr &res) const |
Gets a set of lines containing the traced rays, for displaying them. | |
void | getUntracedRays (CSetOfLinesPtr &res, double dist) const |
Gets a set of lines containing the untraced rays, up to a specified distance, for displaying them. | |
void | generateSetOfTriangles (std::vector< TPolygon3D > &res) const |
Gets the mesh as a set of polygons, to work with them. | |
Static Public Member Functions | |
template<class T > | |
static void | trace2DSetOfRays (const T &e, const CPose3D &initial, CAngularObservationMeshPtr &caom, const TDoubleRange &pitchs, const TDoubleRange &yaws) |
2D ray tracing (will generate a 3D mesh). | |
template<class T > | |
static void | trace1DSetOfRays (const T &e, const CPose3D &initial, CObservation2DRangeScan &obs, const TDoubleRange &yaws) |
2D ray tracing (will generate a vectorial mesh inside a plane). | |
Protected Member Functions | |
void | updateMesh () const |
Updates the mesh, if needed. | |
virtual | ~CAngularObservationMesh () |
Empty destructor. | |
void | addTriangle (const TPoint3D &p1, const TPoint3D &p2, const TPoint3D &p3) const |
Internal method to add a triangle to the mutable mesh. | |
CAngularObservationMesh () | |
Basic constructor. | |
Protected Attributes | |
std::vector < CSetOfTriangles::TTriangle > | triangles |
Actual set of triangles to be displayed. | |
bool | mWireframe |
Whether the mesh will be displayed wireframe or solid. | |
bool | meshUpToDate |
Mutable variable which controls if the object has suffered any change since last time the mesh was updated. | |
bool | mEnableTransparency |
Whether the object may present transparencies or not. | |
mrpt::math::CMatrixTemplate < TPoint3D > | actualMesh |
Mutable object with the mesh's points. | |
mrpt::math::CMatrixB | validityMatrix |
Scan validity matrix. | |
vector< double > | pitchBounds |
Observation pitch range. | |
vector< CObservation2DRangeScan > | scanSet |
Actual scan set which is used to generate the mesh. |
Each element of this set is a single scan through the yaw, given a specific pitch. Each scan has a CPose3D identifying the origin of the scan, which ideally is the same for every one of them.
Definition at line 52 of file CAngularObservationMesh.h.
virtual mrpt::opengl::CAngularObservationMesh::~CAngularObservationMesh | ( | ) | [inline, protected, virtual] |
mrpt::opengl::CAngularObservationMesh::CAngularObservationMesh | ( | ) | [inline, protected] |
void mrpt::opengl::CAngularObservationMesh::addTriangle | ( | const TPoint3D & | p1, | |
const TPoint3D & | p2, | |||
const TPoint3D & | p3 | |||
) | const [protected] |
Internal method to add a triangle to the mutable mesh.
void mrpt::opengl::CAngularObservationMesh::enableTransparency | ( | bool | enabled = true |
) | [inline] |
void mrpt::opengl::CAngularObservationMesh::generatePointCloud | ( | CPointsMap * | out_map | ) | const |
Returns the scanned points as a 3D point cloud.
The target pointmap must be passed as a pointer to allow the use of any derived class.
void mrpt::opengl::CAngularObservationMesh::generateSetOfTriangles | ( | std::vector< TPolygon3D > & | res | ) | const |
Gets the mesh as a set of polygons, to work with them.
void mrpt::opengl::CAngularObservationMesh::generateSetOfTriangles | ( | CSetOfTrianglesPtr & | res | ) | const |
Gets the mesh as a set of triangles, for displaying them.
void mrpt::opengl::CAngularObservationMesh::getPitchBounds | ( | std::vector< double > & | bounds | ) | const |
Gets the pitch bounds for this range.
void mrpt::opengl::CAngularObservationMesh::getPitchBounds | ( | double & | initial, | |
double & | final | |||
) | const |
Gets the initial and final pitch bounds for this range.
void mrpt::opengl::CAngularObservationMesh::getScanSet | ( | std::vector< CObservation2DRangeScan > & | scans | ) | const |
Gets the scan set.
void mrpt::opengl::CAngularObservationMesh::getTracedRays | ( | CSetOfLinesPtr & | res | ) | const |
Gets a set of lines containing the traced rays, for displaying them.
void mrpt::opengl::CAngularObservationMesh::getUntracedRays | ( | CSetOfLinesPtr & | res, | |
double | dist | |||
) | const |
Gets a set of lines containing the untraced rays, up to a specified distance, for displaying them.
bool mrpt::opengl::CAngularObservationMesh::isTransparencyEnabled | ( | ) | const [inline] |
Returns whether the object may be transparent or not.
Definition at line 276 of file CAngularObservationMesh.h.
bool mrpt::opengl::CAngularObservationMesh::isWireframe | ( | ) | const [inline] |
Returns whether the object is configured as wireframe or solid.
Definition at line 264 of file CAngularObservationMesh.h.
virtual void mrpt::opengl::CAngularObservationMesh::render | ( | ) | const [virtual] |
void mrpt::opengl::CAngularObservationMesh::setPitchBounds | ( | const std::vector< double > | bounds | ) |
Sets the pitch bounds for this range.
void mrpt::opengl::CAngularObservationMesh::setPitchBounds | ( | const double | initial, | |
const double | final | |||
) |
Sets the pitch bounds for this range.
bool mrpt::opengl::CAngularObservationMesh::setScanSet | ( | const std::vector< CObservation2DRangeScan > & | scans | ) |
Sets the scan set.
void mrpt::opengl::CAngularObservationMesh::setWireframe | ( | bool | enabled = true |
) | [inline] |
Sets the display mode for the object.
True=wireframe, False=solid.
Definition at line 270 of file CAngularObservationMesh.h.
static void mrpt::opengl::CAngularObservationMesh::trace1DSetOfRays | ( | const T & | e, | |
const CPose3D & | initial, | |||
CObservation2DRangeScan & | obs, | |||
const TDoubleRange & | yaws | |||
) | [inline, static] |
2D ray tracing (will generate a vectorial mesh inside a plane).
Given an object and a range, realizes a scan from the initial pose and stores it in a CObservation2DRangeScan object. The objective may be a COpenGLScene, a CRenderizable or any children of its.
Definition at line 423 of file CAngularObservationMesh.h.
References mrpt::opengl::CAngularObservationMesh::TDoubleRange::amount(), mrpt::opengl::CAngularObservationMesh::TDoubleRange::aperture(), mrpt::slam::CObservation2DRangeScan::aperture, mrpt::slam::CObservation2DRangeScan::deltaPitch, mrpt::slam::CObservation2DRangeScan::maxRange, mrpt::opengl::CAngularObservationMesh::TDoubleRange::negToPos(), mrpt::slam::CObservation2DRangeScan::rightToLeft, mrpt::slam::CObservation2DRangeScan::scan, mrpt::slam::CObservation2DRangeScan::sensorPose, mrpt::slam::CObservation2DRangeScan::validRange, and mrpt::opengl::CAngularObservationMesh::TDoubleRange::values().
static void mrpt::opengl::CAngularObservationMesh::trace2DSetOfRays | ( | const T & | e, | |
const CPose3D & | initial, | |||
CAngularObservationMeshPtr & | caom, | |||
const TDoubleRange & | pitchs, | |||
const TDoubleRange & | yaws | |||
) | [inline, static] |
2D ray tracing (will generate a 3D mesh).
Given an object and two ranges, realizes a scan from the initial pose and stores it in a CAngularObservationMesh object. The objective may be a COpenGLScene, a CRenderizable or any children of its.
Definition at line 407 of file CAngularObservationMesh.h.
References mrpt::opengl::CAngularObservationMesh::TDoubleRange::values().
virtual bool mrpt::opengl::CAngularObservationMesh::traceRay | ( | const mrpt::poses::CPose3D & | o, | |
double & | dist | |||
) | const [virtual] |
Traces a ray to the object, returning the distance to a given pose through its X axis.
Reimplemented from mrpt::opengl::CRenderizable.
void mrpt::opengl::CAngularObservationMesh::updateMesh | ( | ) | const [protected] |
Updates the mesh, if needed.
It's a const method, but modifies mutable content.
mrpt::math::CMatrixTemplate<TPoint3D> mrpt::opengl::CAngularObservationMesh::actualMesh [mutable, protected] |
bool mrpt::opengl::CAngularObservationMesh::mEnableTransparency [protected] |
Whether the object may present transparencies or not.
Definition at line 239 of file CAngularObservationMesh.h.
bool mrpt::opengl::CAngularObservationMesh::meshUpToDate [mutable, protected] |
Mutable variable which controls if the object has suffered any change since last time the mesh was updated.
Definition at line 235 of file CAngularObservationMesh.h.
bool mrpt::opengl::CAngularObservationMesh::mWireframe [protected] |
Whether the mesh will be displayed wireframe or solid.
Definition at line 231 of file CAngularObservationMesh.h.
vector<double> mrpt::opengl::CAngularObservationMesh::pitchBounds [protected] |
Observation pitch range.
When containing exactly two elements, they represent the bounds.
Definition at line 251 of file CAngularObservationMesh.h.
vector<CObservation2DRangeScan> mrpt::opengl::CAngularObservationMesh::scanSet [protected] |
Actual scan set which is used to generate the mesh.
Definition at line 255 of file CAngularObservationMesh.h.
std::vector<CSetOfTriangles::TTriangle> mrpt::opengl::CAngularObservationMesh::triangles [mutable, protected] |
mrpt::math::CMatrixB mrpt::opengl::CAngularObservationMesh::validityMatrix [mutable, protected] |
Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:32:05 EDT 2009 |