Helios++
Helios software for LiDAR simulations
|
Abstract class defining core mechanisms to adapt static objects to the visual Helios context based on PCL and VTK libraries. More...
#include <VHStaticObjectAdapter.h>
Public Member Functions | |
VHStaticObjectAdapter (ScenePart &staticObj) | |
Constructor for the visual Helios static object adapter. More... | |
virtual void | buildPolymesh () |
Build the polygon mesh from static object primitives. This implies building corresponding vertices vector too. More... | |
virtual void | constructPolymesh ()=0 |
Instantiate the polymesh object. More... | |
virtual void | vertexToMesh (Vertex const &vertex)=0 |
Add a vertex to the polymesh. More... | |
virtual void | addTriangleToPolymesh (Primitive *primitive, int &offset) |
Function to add triangle primitives to the polymesh during building time. More... | |
virtual void | addVoxelToPolymesh (Primitive *primitive, int &offset) |
Function to add voxel primitives to the polymesh during building time. More... | |
ScenePart & | getStaticObj () |
Obtain the static object. More... | |
vector< pcl::Vertices > const & | getVertices () const |
Obtain the ordered vertices indices representing the static object. More... | |
string const & | getId () const |
Obtain the ID of the static object. More... | |
bool | isRenderingNormals () const |
Check whether the static object normals must be rendered or not. More... | |
void | setRenderingNormals (bool const renderingNormals) |
Enable or disable normals rendering for the static object. More... | |
Protected Attributes | |
ScenePart & | staticObj |
The adapted static object. More... | |
vector< pcl::Vertices > | vertices |
Static object vertices connection specification through ordered indices for visualization purposes. More... | |
bool | renderingNormals |
Specify if the static object normals must be rendered (true) or not (false) | |
Abstract class defining core mechanisms to adapt static objects to the visual Helios context based on PCL and VTK libraries.
|
inline |
Constructor for the visual Helios static object adapter.
staticObj | Static object to be adapted for visual Helios |
|
virtual |
Function to add triangle primitives to the polymesh during building time.
primitive | The triangle primitive to be added |
offset | The offset for vertex index at current iteration |
|
virtual |
Function to add voxel primitives to the polymesh during building time.
primitive | The triangle primitive to be added |
offset | The offset for vertex index at current iteration |
|
virtual |
Build the polygon mesh from static object primitives. This implies building corresponding vertices vector too.
|
pure virtual |
Instantiate the polymesh object.
The buildPolymesh method requires to call this function to instantiate a new mesh replacing the old one if any. Therefore, any concrete implementation of a VHStaticObjectAdapter must provide its own definition for this method.
Implemented in visualhelios::VHStaticObjectXYZRGBAdapter, and visualhelios::VHStaticObjectXYZAdapter.
|
inline |
Obtain the ID of the static object.
|
inline |
Obtain the static object.
WARNING this getter returns the static object (scene part) reference allowing modifications. Use with caution.
|
inline |
Obtain the ordered vertices indices representing the static object.
|
inline |
Check whether the static object normals must be rendered or not.
|
inline |
Enable or disable normals rendering for the static object.
renderingNormals | True to enable rendering normals, false to disable it |
|
pure virtual |
Add a vertex to the polymesh.
The buildPolymesh method requires to call this function to generate points/vertices defining the mesh from static object primitives. Therefore, any concrete implementation of a VHStaticObjectAdapter must provide its own definition for this method.
vertex | Vertex from the static object that must be added to the mesh |
Implemented in visualhelios::VHStaticObjectXYZRGBAdapter, and visualhelios::VHStaticObjectXYZAdapter.
|
protected |
The adapted static object.
|
protected |
Static object vertices connection specification through ordered indices for visualization purposes.
It is, how the vertices must be connected to render each primitive in the polygon mesh.