ImFusion SDK 4.3
GlMeshRendererSurface Class Reference

#include <ImFusion/Mesh/Rendering/GlMeshRendererSurface.h>

Highly configurable renderer to display the surface of a Mesh. More...

Detailed Description

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:

  • show filled surfaces, wireframe or both
  • individual Material modes for front- and back faces
  • Optional clipping against a Geometry::Plane

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::ProgramgetShaderProgram () const
 

Member Function Documentation

◆ render()

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.

Parameters
meshThe mesh to render.
optionsThe rendering options to use.
viewStateThe GL::ViewState to use.
oitAn optional pointer to a GL::OrderIndependentTransparency instance to use.
objectPickingAn optional pointer to a GlObjectPicking instance to use. If specified will use objectPicking->objectId(&mesh.mesh()) as object ID.

◆ renderWithCustomOptions()

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.

Parameters
meshThe mesh to render.
optionsThe rendering options to use.
opacityValue to override options.p_opacity with.
clipPlaneCVNFValue to override options.p_clipPlaneCVNF with.
clipModeValue to override options.p_clipOptions->p_mode with.
viewStateThe GL::ViewState to use.
oitAn optional pointer to a GL::OrderIndependentTransparency instance to use.
objectPickingAn optional pointer to a GlObjectPicking instance to use.
pickingObjectIdPtrObject pointer to use for determining the object ID during object picking (cf. GL::ObjectPicking::objectId()).

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close