Back to list of all libraries | See all modules
mrpt-opengl
This library includes several data classes that represent objects that can be inserted into a 3D scene, which can be then rendered or streamed to disk or whatever.
A good starting point to explore this library is the base class for all the 3D objects: mrpt::opengl::CRenderizable
A 3D scene is represented by an object of the type mrpt::opengl::COpenGLScene, which in turn can contain one or several "viewports" in such a way that the rendering area is divided into several spaces, each displaying the same or different objects. See the tutorial online: http://www.mrpt.org/Tutorial_3D_Scenes
See the full list of classes in mrpt::opengl.
Below follows a table with the preview of most rendering primitive classes:
Also, pose PDF classes can be converted into OpenGL objects with CSetOfObjects::posePDF2opengl():
Note: The following extra OpenGL classes are provided by other libraries:
mrpt::opengl::CAngularObservationMesh (In mrpt-maps) | |
mrpt::opengl::CPlanarLaserScan (In mrpt-maps) |
Classes | |
class | mrpt::opengl::C3DSScene |
This element keeps a set of objects imported from a 3DStudio file (.3ds). More... | |
class | mrpt::opengl::CArrow |
A 3D arrow. More... | |
class | mrpt::opengl::CAssimpModel |
This class can load & render 3D models in a number of different formats (requires the library assimp). More... | |
class | mrpt::opengl::CAxis |
Draw a 3D world axis, with coordinate marks at some regular interval. More... | |
class | mrpt::opengl::CBox |
A solid or wireframe box in 3D, defined by 6 rectangular faces parallel to the planes X, Y and Z (note that the object can be translated and rotated afterwards as any other CRenderizable object using the "object pose" in the base class). More... | |
class | mrpt::opengl::CCamera |
A camera: if added to a scene, the viewpoint defined by this camera will be used instead of the camera parameters set in COpenGLViewport::m_camera. More... | |
class | mrpt::opengl::CColorBar |
A colorbar indicator. More... | |
class | mrpt::opengl::CCylinder |
A cylinder or cone whose base lies in the XY plane. More... | |
class | mrpt::opengl::CDisk |
A planar disk in the XY plane. More... | |
class | mrpt::opengl::CEllipsoid |
A 2D ellipse or 3D ellipsoid, depending on the size of the m_cov matrix (2x2 or 3x3). More... | |
class | mrpt::opengl::CEllipsoidInverseDepth2D |
An especial "ellipsoid" in 3D computed as the uncertainty iso-surfaces of a (inv_range,yaw) variable. More... | |
class | mrpt::opengl::CEllipsoidInverseDepth3D |
An especial "ellipsoid" in 3D computed as the uncertainty iso-surfaces of a (inv_range,yaw,pitch) variable. More... | |
class | mrpt::opengl::CEllipsoidRangeBearing2D |
An especial "ellipsoid" in 2D computed as the uncertainty iso-surfaces of a (range,bearing) variable. More... | |
class | mrpt::opengl::CFBORender |
A class for rendering 3D scenes off-screen directly into an image using OpenGL extensions (glext). More... | |
class | mrpt::opengl::CFrustum |
A solid or wireframe frustum in 3D (a rectangular truncated pyramid), with arbitrary (possibly assymetric) field-of-view angles. More... | |
class | mrpt::opengl::CGeneralizedCylinder |
This object represents any figure obtained by extruding any profile along a given axis. More... | |
class | mrpt::opengl::CGeneralizedEllipsoidTemplate< DIM > |
A class that generalizes the concept of an ellipsoid to arbitrary parameterizations of uncertainty shapes in either 2D or 3D. More... | |
class | mrpt::opengl::CGridPlaneXY |
A grid of lines over the XY plane. More... | |
class | mrpt::opengl::CGridPlaneXZ |
A grid of lines over the XZ plane. More... | |
class | mrpt::opengl::CMesh |
A planar (XY) grid where each cell has an associated height and, optionally, a texture map. More... | |
class | mrpt::opengl::CMesh3D |
A 3D mesh composed of Triangles and/or Quads. More... | |
class | mrpt::opengl::CMeshFast |
A planar (XY) grid where each cell has an associated height and, optionally, a texture map. More... | |
class | mrpt::opengl::COctoMapVoxels |
A flexible renderer of voxels, typically from a 3D octo map (see mrpt::maps::COctoMap). More... | |
class | mrpt::opengl::COctreePointRenderer< Derived > |
Template class that implements the data structure and algorithms for Octree-based efficient rendering. More... | |
class | mrpt::opengl::COpenGLScene |
This class allows the user to create, load, save, and render 3D scenes using OpenGL primitives. More... | |
class | mrpt::opengl::COpenGLStandardObject |
Objects of this class represent a generic openGL object without specific geometric properties. More... | |
class | mrpt::opengl::COpenGLViewport |
A viewport within a COpenGLScene, containing a set of OpenGL objects to render. More... | |
class | mrpt::opengl::CPointCloud |
A cloud of points, all with the same color or each depending on its value along a particular coordinate axis. More... | |
class | mrpt::opengl::CPointCloudColoured |
A cloud of points, each one with an individual colour (R,G,B). More... | |
class | mrpt::opengl::CPolyhedron |
This class represents arbitrary polyhedra. More... | |
class | mrpt::opengl::CRenderizable |
The base class of 3D objects that can be directly rendered through OpenGL. More... | |
class | mrpt::opengl::CRenderizableDisplayList |
A renderizable object suitable for rendering with OpenGL's display lists. More... | |
class | mrpt::opengl::CSetOfLines |
A set of independent lines (or segments), one line with its own start and end positions (X,Y,Z). More... | |
class | mrpt::opengl::CSetOfObjects |
A set of object, which are referenced to the coordinates framework established in this object. More... | |
class | mrpt::opengl::CSetOfTexturedTriangles |
A set of textured triangles. More... | |
class | mrpt::opengl::CSetOfTriangles |
A set of colored triangles. More... | |
class | mrpt::opengl::CSimpleLine |
A line segment. More... | |
class | mrpt::opengl::CSphere |
A solid or wire-frame sphere. More... | |
class | mrpt::opengl::CText |
A 2D text (bitmap rendering): it always "faces the observer" despite it's at some 3D location. More... | |
class | mrpt::opengl::CText3D |
A 3D text (rendered with OpenGL primitives), with selectable font face and drawing style. More... | |
class | mrpt::opengl::CTextMessageCapable |
Keeps a list of text messages which can be rendered to OpenGL contexts by graphic classes. More... | |
class | mrpt::opengl::CTexturedObject |
A base class for all OpenGL objects with loadable textures. More... | |
class | mrpt::opengl::CTexturedPlane |
A 2D plane in the XY plane with a texture image. More... | |
class | mrpt::opengl::CVectorField2D |
A 2D vector field representation, consisting of points and arrows drawn on a plane (invisible grid). More... | |
class | mrpt::opengl::CVectorField3D |
A 3D vector field representation, consisting of points and arrows drawn at any spatial position. More... | |
struct | mrpt::opengl::T2DTextData |
An auxiliary struct for holding a list of text messages in some mrpt::opengl & mrpt::gui classes The font can be either a bitmapped or a vectorized font. More... | |
Namespaces | |
mrpt::opengl::gl_utils | |
A set of auxiliary functions that can be called to render OpenGL primitives from MRPT or user code. | |
mrpt::opengl | |
The namespace for 3D scene representation and rendering. | |
mrpt::opengl::graph_tools | |
Tool functions for graphs of pose constraints. | |
mrpt::opengl::stock_objects | |
A collection of pre-built 3D objects for quick insertion in opengl::COpenGLScene objects. | |
Enumerations | |
enum | mrpt::opengl::TOpenGLFont { mrpt::opengl::MRPT_GLUT_BITMAP_NONE = -1, mrpt::opengl::MRPT_GLUT_BITMAP_TIMES_ROMAN_10 = 0, mrpt::opengl::MRPT_GLUT_BITMAP_TIMES_ROMAN_24 = 1, mrpt::opengl::MRPT_GLUT_BITMAP_HELVETICA_10 = 2, mrpt::opengl::MRPT_GLUT_BITMAP_HELVETICA_12 = 3, mrpt::opengl::MRPT_GLUT_BITMAP_HELVETICA_18 = 4 } |
Existing fonts for 2D texts in mrpt::opengl methods. More... | |
Functions | |
void | mrpt::global_settings::OCTREE_RENDER_MAX_DENSITY_POINTS_PER_SQPIXEL (float value) |
Default value = 0.01 points/px^2. More... | |
size_t | mrpt::global_settings::OCTREE_RENDER_MAX_POINTS_PER_NODE () |
Default value = 1e5. More... | |
Tool functions for graphs of pose constraints | |
template<class GRAPH_T > | |
CSetOfObjects::Ptr | mrpt::opengl::graph_tools::graph_visualize (const GRAPH_T &g, const mrpt::utils::TParametersDouble &extra_params=mrpt::utils::TParametersDouble()) |
Returns an opengl objects representation of an arbitrary graph, as a network of 3D pose frames. More... | |
Existing fonts for 2D texts in mrpt::opengl methods.
Enumerator | |
---|---|
MRPT_GLUT_BITMAP_NONE | |
MRPT_GLUT_BITMAP_TIMES_ROMAN_10 | |
MRPT_GLUT_BITMAP_TIMES_ROMAN_24 | |
MRPT_GLUT_BITMAP_HELVETICA_10 | |
MRPT_GLUT_BITMAP_HELVETICA_12 | |
MRPT_GLUT_BITMAP_HELVETICA_18 |
Definition at line 25 of file opengl_fonts.h.
CSetOfObjects::Ptr mrpt::opengl::graph_tools::graph_visualize | ( | const GRAPH_T & | g, |
const mrpt::utils::TParametersDouble & | extra_params = mrpt::utils::TParametersDouble() |
||
) |
Returns an opengl objects representation of an arbitrary graph, as a network of 3D pose frames.
Note that the "global" coordinates of each node are taken from mrpt::graphs::CNetworkOfPoses::nodes, so if a node appears in "edges" but not in "nodes" it will be not displayed.
g | The graph |
extra_params | An extra set of optional parameters (see below). List of accepted extra parameters (note that all are double values, booleans are emulated with 0 & !=0 values): |
Parameter name | Description | Default value | |
show_ID_labels | If set to !=0, show poses ID labels | 0 (don't show) | |
show_ground_grid | If set to !=0, create a gray grid on the ground level (mrpt::opengl::CGridPlaneXY). The extension of the grid is computed to cover the entire graph extension | 1 (do show) | |
show_edges | If set to !=0, draw lines between nodes with at least one edge between them. | 1 (do show) | |
show_node_corners | If set to !=0, draw a small 3D corner frame at each node (see mrpt::opengl::stock_objects::CornerXYZSimple). | 1 (do show) | |
show_edge_rel_poses | If set to !=0, draw the relative poses stored in each edge as a small extra 3D corner frame at each node pose (+) the edge pose (see mrpt::opengl::stock_objects::CornerXYZSimple). | 1 (do show) | |
nodes_point_size | If set to !=0, draw a point of the given size (glPointSize) at each node. | 0 (no points) <tr> <td align="center" ><code> nodes_corner_scale </code></td> <td> If show_node_corners!=0, the size (length) of te corner lines. | 0.7 |
nodes_edges_corner_scale | If show_edge_rel_poses is !=0, the size of the corners at the end of each drawn edge. | 0.4 | |
nodes_point_color | If nodes_point_size!=0, set this value to a hexadecimal int value 0xRRGGBB with the desired RGB color of points. | 0xA0A0A0 (light gray) | |
edge_color | If show_edges is !=0, the color of those edges as a hexadecimal int value 0xAARRGGBB with Alpha+RGB color (Alpha=0xFF:opaque,0x00:transparent). | 0x400000FF | |
edge_rel_poses_color | If show_edge_rel_poses is !=0, the color of those edges as a hexadecimal int value 0xAARRGGBB with Alpha+RGB color (Alpha=0xFF:opaque,0x00:transparent). | 0x40FF8000 | |
edge_width | If show_edges is !=0, the width of edge lines. | 2.0 </table>
|
Definition at line 26 of file graph_tools_impl.h.
References mrpt::opengl::stock_objects::CornerXYSimple(), mrpt::opengl::stock_objects::CornerXYZSimple(), mrpt::format(), mrpt::utils::TParameters< T >::getWithDefaultVal(), mrpt::utils::keep_max(), mrpt::utils::keep_min(), MRPT_TRY_END, MRPT_TRY_START, mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::x(), mrpt::math::TPoint3D::x, mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::y(), mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
void mrpt::global_settings::OCTREE_RENDER_MAX_DENSITY_POINTS_PER_SQPIXEL | ( | float | value | ) |
Default value = 0.01 points/px^2.
Affects to these classes (read their docs for further details):
Definition at line 32 of file CPointCloud.cpp.
References OCTREE_RENDER_MAX_DENSITY_POINTS_PER_SQPIXEL_value.
Referenced by mrpt::opengl::CPointCloudColoured::render_subset().
size_t mrpt::global_settings::OCTREE_RENDER_MAX_POINTS_PER_NODE | ( | ) |
Default value = 1e5.
Maximum number of elements in each octree node before spliting. Affects to these classes (read their docs for further details):
Definition at line 37 of file CPointCloud.cpp.
References OCTREE_RENDER_MAX_POINTS_PER_NODE_value.
Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::internal_recursive_split().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019 |