A mesh built from a set of 2D laser scan observations.
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 56 of file CAngularObservationMesh.h.
#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_dl () 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. | |
void | getActualMesh (mrpt::math::CMatrixTemplate< mrpt::math::TPoint3D > &pts, mrpt::math::CMatrixBool &validity) const |
Retrieves the full mesh, along with the validity matrix. | |
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. | |
std::vector< double > | pitchBounds |
Observation pitch range. | |
std::vector < CObservation2DRangeScan > | scanSet |
Actual scan set which is used to generate the mesh. | |
RTTI stuff | |
typedef CAngularObservationMeshPtr | SmartPtr |
static mrpt::utils::CLASSINIT | _init_CAngularObservationMesh |
static mrpt::utils::TRuntimeClassId | classCAngularObservationMesh |
static const mrpt::utils::TRuntimeClassId * | classinfo |
static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
Returns information about the class of an object in runtime. | |
virtual mrpt::utils::CObject * | duplicate () const |
Returns a copy of the object, indepently of its class. | |
static mrpt::utils::CObject * | CreateObject () |
static CAngularObservationMeshPtr | Create () |
A typedef for the associated smart pointer
Definition at line 57 of file CAngularObservationMesh.h.
virtual mrpt::opengl::CAngularObservationMesh::~CAngularObservationMesh | ( | ) | [inline, protected, virtual] |
Empty destructor.
Definition at line 223 of file CAngularObservationMesh.h.
mrpt::opengl::CAngularObservationMesh::CAngularObservationMesh | ( | ) | [inline, protected] |
Basic constructor.
Definition at line 263 of file CAngularObservationMesh.h.
static const mrpt::utils::TRuntimeClassId* mrpt::opengl::CAngularObservationMesh::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::opengl::CRenderizableDisplayList.
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.
static CAngularObservationMeshPtr mrpt::opengl::CAngularObservationMesh::Create | ( | ) | [static] |
static mrpt::utils::CObject* mrpt::opengl::CAngularObservationMesh::CreateObject | ( | ) | [static] |
virtual mrpt::utils::CObject* mrpt::opengl::CAngularObservationMesh::duplicate | ( | ) | const [virtual] |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
void mrpt::opengl::CAngularObservationMesh::enableTransparency | ( | bool | enabled = true ) |
[inline] |
Enables or disables transparencies.
Definition at line 287 of file CAngularObservationMesh.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
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 | ( | CSetOfTrianglesPtr & | res ) | const |
Gets the mesh as a set of triangles, for displaying them.
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::getActualMesh | ( | mrpt::math::CMatrixTemplate< mrpt::math::TPoint3D > & | pts, |
mrpt::math::CMatrixBool & | validity | ||
) | const [inline] |
Retrieves the full mesh, along with the validity matrix.
Definition at line 352 of file CAngularObservationMesh.h.
void mrpt::opengl::CAngularObservationMesh::getPitchBounds | ( | double & | initial, |
double & | final | ||
) | const |
Gets the initial and final pitch bounds for this range.
void mrpt::opengl::CAngularObservationMesh::getPitchBounds | ( | std::vector< double > & | bounds ) | const |
Gets the pitch bounds for this range.
virtual const mrpt::utils::TRuntimeClassId* mrpt::opengl::CAngularObservationMesh::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::opengl::CRenderizableDisplayList.
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 281 of file CAngularObservationMesh.h.
bool mrpt::opengl::CAngularObservationMesh::isWireframe | ( | ) | const [inline] |
Returns whether the object is configured as wireframe or solid.
Definition at line 268 of file CAngularObservationMesh.h.
virtual void mrpt::opengl::CAngularObservationMesh::render_dl | ( | ) | const [virtual] |
Renderizes the object.
Implements mrpt::opengl::CRenderizableDisplayList.
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 274 of file CAngularObservationMesh.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
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 437 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 421 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::utils::CLASSINIT mrpt::opengl::CAngularObservationMesh::_init_CAngularObservationMesh [static, protected] |
Definition at line 57 of file CAngularObservationMesh.h.
mrpt::math::CMatrixTemplate<TPoint3D> mrpt::opengl::CAngularObservationMesh::actualMesh [mutable, protected] |
Mutable object with the mesh's points.
Definition at line 247 of file CAngularObservationMesh.h.
mrpt::utils::TRuntimeClassId mrpt::opengl::CAngularObservationMesh::classCAngularObservationMesh [static] |
Definition at line 57 of file CAngularObservationMesh.h.
Definition at line 57 of file CAngularObservationMesh.h.
bool mrpt::opengl::CAngularObservationMesh::mEnableTransparency [protected] |
Whether the object may present transparencies or not.
Definition at line 243 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 239 of file CAngularObservationMesh.h.
bool mrpt::opengl::CAngularObservationMesh::mWireframe [protected] |
Whether the mesh will be displayed wireframe or solid.
Definition at line 235 of file CAngularObservationMesh.h.
std::vector<double> mrpt::opengl::CAngularObservationMesh::pitchBounds [protected] |
Observation pitch range.
When containing exactly two elements, they represent the bounds.
Definition at line 255 of file CAngularObservationMesh.h.
std::vector<CObservation2DRangeScan> mrpt::opengl::CAngularObservationMesh::scanSet [protected] |
Actual scan set which is used to generate the mesh.
Definition at line 259 of file CAngularObservationMesh.h.
std::vector<CSetOfTriangles::TTriangle> mrpt::opengl::CAngularObservationMesh::triangles [mutable, protected] |
Actual set of triangles to be displayed.
Definition at line 227 of file CAngularObservationMesh.h.
mrpt::math::CMatrixB mrpt::opengl::CAngularObservationMesh::validityMatrix [mutable, protected] |
Scan validity matrix.
Definition at line 251 of file CAngularObservationMesh.h.
Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:46:17 UTC 2011 |