![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Mesh/Rendering/GlMeshRendererSurface.h>
Highly configurable renderer to display the surface of a Mesh. More...
Highly configurable renderer to display the surface of a Mesh.
This low-level renderer offers a wide range of different rendering modes that are encapsulated in DisplayOptions:
This class does not implement the GlObject interface by design as it is meant to serve as a reusable component to be integrated into high-level classes.
Classes | |
| struct | DisplayOptions |
| Complete record of rendering options for GlMeshRendererSurface. More... | |
Public Member Functions | |
| void | render (const MeshGl &mesh, const DisplayOptions &options, const GL::ViewState &viewState, const GL::OrderIndependentTransparency *oit=nullptr, const GL::ObjectPicking *objectPicking=nullptr) const |
| Renders the mesh into the currently active OpenGL context as specified in options. | |
| void | renderWithCustomOptions (const MeshGl &mesh, const DisplayOptions &options, double opacity, const std::optional< vec4 > &clipPlaneCVNF, DisplayOptions::Clipping::Mode clipMode, const GL::ViewState &viewState, const GL::OrderIndependentTransparency *oit=nullptr, const GL::ObjectPicking *objectPicking=nullptr, const void *pickingObjectIdPtr=nullptr) const |
| Renders the mesh into the currently active OpenGL context as specified in options but overriding opacity and clip plane options. | |
| virtual GL::Program * | getShaderProgram () const |
| void render | ( | const MeshGl & | mesh, |
| const DisplayOptions & | options, | ||
| const GL::ViewState & | viewState, | ||
| const GL::OrderIndependentTransparency * | oit = nullptr, | ||
| const GL::ObjectPicking * | objectPicking = nullptr ) const |
Renders the mesh into the currently active OpenGL context as specified in options.
| mesh | The mesh to render. |
| options | The rendering options to use. |
| viewState | The GL::ViewState to use. |
| oit | An optional pointer to a GL::OrderIndependentTransparency instance to use. |
| objectPicking | An optional pointer to a GlObjectPicking instance to use. If specified will use objectPicking->objectId(&mesh.mesh()) as object ID. |
| void renderWithCustomOptions | ( | const MeshGl & | mesh, |
| const DisplayOptions & | options, | ||
| double | opacity, | ||
| const std::optional< vec4 > & | clipPlaneCVNF, | ||
| DisplayOptions::Clipping::Mode | clipMode, | ||
| const GL::ViewState & | viewState, | ||
| const GL::OrderIndependentTransparency * | oit = nullptr, | ||
| const GL::ObjectPicking * | objectPicking = nullptr, | ||
| const void * | pickingObjectIdPtr = nullptr ) const |
Renders the mesh into the currently active OpenGL context as specified in options but overriding opacity and clip plane options.
| mesh | The mesh to render. |
| options | The rendering options to use. |
| opacity | Value to override options.p_opacity with. |
| clipPlaneCVNF | Value to override options.p_clipPlaneCVNF with. |
| clipMode | Value to override options.p_clipOptions->p_mode with. |
| viewState | The GL::ViewState to use. |
| oit | An optional pointer to a GL::OrderIndependentTransparency instance to use. |
| objectPicking | An optional pointer to a GlObjectPicking instance to use. |
| pickingObjectIdPtr | Object pointer to use for determining the object ID during object picking (cf. GL::ObjectPicking::objectId()). |