namespace mrpt::viz

Overview

The namespace for 3D scene representation and rendering.

See also the summary page of the mrpt-opengl library for more info and thumbnails of many of the render primitive.

namespace viz {

// namespaces

namespace mrpt::viz::graph_tools;
namespace mrpt::viz::stock_objects;

// typedefs

typedef std::deque<CVisualObject::Ptr> ListVisualObjects;

// enums

enum CUBE_TEXTURE_FACE;
enum TCullFace;
enum TOpenGLFontStyle;
enum predefined_voxel_sets_t;

// structs

struct T2DTextData;
struct TFontParams;
struct TLightParameters;
struct TTriangle;

// classes

class CAngularObservationMesh;
class CArrow;
class CAssimpModel;
class CAxis;
class CBox;
class CCamera;
class CColorBar;
class CCylinder;
class CDisk;
class CEllipsoid2D;
class CEllipsoid3D;
class CEllipsoidInverseDepth2D;
class CEllipsoidInverseDepth3D;
class CEllipsoidRangeBearing2D;
class CFrustum;

template <int DIM>
class CGeneralizedEllipsoidTemplate;

class CGridPlaneXY;
class CGridPlaneXZ;
class CMesh;
class CMesh3D;
class CMeshFast;
class COctoMapVoxels;
class CPlanarLaserScan;
class CPointCloud;
class CPointCloudColoured;
class CPolyhedron;
class CSetOfLines;
class CSetOfObjects;
class CSetOfTexturedTriangles;
class CSetOfTriangles;
class CSimpleLine;
class CSkyBox;
class CSphere;
class CText;
class CText3D;
class CTextMessageCapable;
class CTexturedPlane;
class CVectorField2D;
class CVectorField3D;
class CVisualObject;
class PLY_Exporter;
class PLY_Importer;

template <class POINTCLOUD>
class PointCloudAdapter;

template <>
class PointCloudAdapter<mrpt::maps::CColouredPointsMap>;

template <>
class PointCloudAdapter<mrpt::viz::CPointCloud>;

template <>
class PointCloudAdapter<mrpt::viz::CPointCloudColoured>;

template <>
class PointCloudAdapter<mrpt::maps::CPointsMap>;

template <>
class PointCloudAdapter<mrpt::maps::CPointsMapXYZIRT>;

template <>
class PointCloudAdapter<mrpt::maps::CPointsMapXYZI>;

template <>
class PointCloudAdapter<mrpt::maps::CWeightedPointsMap>;

template <>
class PointCloudAdapter<mrpt::maps::CSimplePointsMap>;

template <>
class PointCloudAdapter<pcl::PointCloud<pcl::PointXYZRGB>>;

template <>
class PointCloudAdapter<mrpt::obs::CObservation3DRangeScan>;

template <>
class PointCloudAdapter<pcl::PointCloud<pcl::PointXYZRGBA>>;

template <>
class PointCloudAdapter<pcl::PointCloud<pcl::PointXYZ>>;

class Scene;
class Viewport;
class VisualObjectParams_Lines;
class VisualObjectParams_Points;
class VisualObjectParams_TexturedTriangles;
class VisualObjectParams_Triangles;
class Visualizable;

// global functions

template <class POSE_PDF>
CSetOfObjects::Ptr posePDF2opengl(const POSE_PDF& o);

mrpt::serialization::CArchive& operator >> (mrpt::serialization::CArchive& in, CPolyhedron::TPolyhedronEdge& o);
mrpt::serialization::CArchive& operator << (mrpt::serialization::CArchive& out, const CPolyhedron::TPolyhedronEdge& o);
mrpt::serialization::CArchive& operator >> (mrpt::serialization::CArchive& in, CPolyhedron::TPolyhedronFace& o);
mrpt::serialization::CArchive& operator << (mrpt::serialization::CArchive& out, const CPolyhedron::TPolyhedronFace& o);

template <class T>
CSetOfLines::Ptr& operator << (CSetOfLines::Ptr& l, const T& s);

CSetOfObjects::Ptr& operator << (CSetOfObjects::Ptr& s, const CVisualObject::Ptr& r);

template <class T>
CSetOfObjects::Ptr& operator << (CSetOfObjects::Ptr& o, const std::vector<T>& v);

template <class T>
CSetOfTriangles::Ptr& operator << (CSetOfTriangles::Ptr& s, const T& t);

void registerAllClasses_mrpt_viz();
Scene::Ptr& operator << (Scene::Ptr& s, const CVisualObject::Ptr& r);

template <class T>
Scene::Ptr& operator << (Scene::Ptr& s, const std::vector<T>& v);

mrpt::serialization::CArchive& operator >> (
    mrpt::serialization::CArchive& in,
    mrpt::viz::TLightParameters& o
    );

mrpt::serialization::CArchive& operator << (
    mrpt::serialization::CArchive& out,
    const mrpt::viz::TLightParameters& o
    );

Viewport::Ptr& operator << (Viewport::Ptr& s, const CVisualObject::Ptr& r);
Viewport::Ptr& operator << (Viewport::Ptr& s, const std::vector<CVisualObject::Ptr>& v);

CArchive& operator << (
    CArchive& out,
    const COctoMapVoxels::TInfoPerVoxelSet& a
    );

CArchive& operator >> (
    CArchive& in,
    COctoMapVoxels::TInfoPerVoxelSet& a
    );

CArchive& operator << (
    CArchive& out,
    const COctoMapVoxels::TGridCube& a
    );

CArchive& operator >> (
    CArchive& in,
    COctoMapVoxels::TGridCube& a
    );

CArchive& operator << (
    CArchive& out,
    const COctoMapVoxels::TVoxel& a
    );

CArchive& operator >> (
    CArchive& in,
    COctoMapVoxels::TVoxel& a
    );

} // namespace viz

Typedefs

typedef std::deque<CVisualObject::Ptr> ListVisualObjects

A list of smart pointers to renderizable objects.

Global Functions

template <class POSE_PDF>
CSetOfObjects::Ptr posePDF2opengl(const POSE_PDF& o)

Returns a representation of a the PDF - this is just an auxiliary function, it’s more natural to call mrpt::poses::CPosePDF::getAs3DObject

mrpt::serialization::CArchive& operator >> (mrpt::serialization::CArchive& in, CPolyhedron::TPolyhedronEdge& o)

Reads a polyhedron edge from a binary stream.

mrpt::serialization::CArchive& operator << (mrpt::serialization::CArchive& out, const CPolyhedron::TPolyhedronEdge& o)

Writes a polyhedron edge to a binary stream.

mrpt::serialization::CArchive& operator >> (mrpt::serialization::CArchive& in, CPolyhedron::TPolyhedronFace& o)

Reads a polyhedron face from a binary stream.

mrpt::serialization::CArchive& operator << (mrpt::serialization::CArchive& out, const CPolyhedron::TPolyhedronFace& o)

Writes a polyhedron face to a binary stream.

template <class T>
CSetOfLines::Ptr& operator << (CSetOfLines::Ptr& l, const T& s)

Inserts a set of segments into the list.

Allows call chaining.

See also:

mrpt::viz::CSetOfLines::appendLines

CSetOfObjects::Ptr& operator << (CSetOfObjects::Ptr& s, const CVisualObject::Ptr& r)

Inserts an object into the list.

Allows call chaining.

See also:

mrpt::viz::CSetOfObjects::insert

template <class T>
CSetOfObjects::Ptr& operator << (CSetOfObjects::Ptr& o, const std::vector<T>& v)

Inserts a set of objects into the list.

Allows call chaining.

See also:

mrpt::viz::CSetOfObjects::insert

template <class T>
CSetOfTriangles::Ptr& operator << (CSetOfTriangles::Ptr& s, const T& t)

Inserts a set of triangles into the list; note that this method allows one to pass another CSetOfTriangles as argument.

Allows call chaining.

See also:

mrpt::viz::CSetOfTriangles::insertTriangle

void registerAllClasses_mrpt_viz()

Forces manual RTTI registration of all serializable classes in this namespace.

Should never be required to be explicitly called by users, except if building MRPT as a static library.

Scene::Ptr& operator << (Scene::Ptr& s, const CVisualObject::Ptr& r)

Inserts an openGL object into a scene.

Allows call chaining.

See also:

mrpt::viz::Scene::insert

template <class T>
Scene::Ptr& operator << (Scene::Ptr& s, const std::vector<T>& v)

Inserts any iterable collection of openGL objects into a scene, allowing call chaining.

See also:

mrpt::viz::Scene::insert

Viewport::Ptr& operator << (Viewport::Ptr& s, const CVisualObject::Ptr& r)

Inserts an openGL object into a viewport.

Allows call chaining.

See also:

mrpt::viz::Viewport::insert

Viewport::Ptr& operator << (Viewport::Ptr& s, const std::vector<CVisualObject::Ptr>& v)

Inserts any iterable set of openGL objects into a viewport.

Allows call chaining.

See also:

mrpt::viz::Viewport::insert