ImFusion SDK 4.3
MeshDisplayOptions Class Reference

#include <ImFusion/Base/MeshDisplayOptions.h>

DataComponent to store the configuration how meshes should be rendered by default (through MeshDisplayHandler). More...

+ Inheritance diagram for MeshDisplayOptions:

Detailed Description

DataComponent to store the configuration how meshes should be rendered by default (through MeshDisplayHandler).

MeshDisplayOptions are attached to the DataComponentList of its parent Mesh so that they can be accessed easily from everywhere. MeshDisplayHandler will query them to configure its renderers.

See also
MeshDisplayHandler, MeshRendererSurface, MeshRendererIntersection, MeshRendererNormals

Public Types

enum  RenderMode2d { Intersection , Surface , SurfaceWithClipping }
 Enumeration of options how a mesh should be shown in MPR views. More...
 

Public Member Functions

bool operator== (const MeshDisplayOptions &rhs) const
 
std::string id () const override
 Returns a unique string identifier for this type of data component.
 
void setUseFaceNormals (bool value)
 Convenience function to set p_useFaceNormals of both p_surfaceRendering and p_normalsRendering at once.
 
bool usesFaceNormals () const
 Convenience function to check if p_useFaceNormals is set of both p_surfaceRendering and p_normalsRendering.
 
- Public Member Functions inherited from DataComponent< MeshDisplayOptions >
std::unique_ptr< DataComponentBaseclone () const override
 Creates a clone of this data component.
 
std::unique_ptr< SubclasscloneDerived () const
 
bool assign (const DataComponentBase &other) override
 Assigns the content of other to this data component.
 
bool equals (const DataComponentBase &other) const override
 Compares this data component to other for equality.
 
- Public Member Functions inherited from Configurable
virtual void configure (const Properties *p)
 Configure this object instance by de-serializing the given Properties.
 
virtual void configuration (Properties *p) const
 Serialize the current object configuration into the given Properties object.
 
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
 
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
 
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 
 Configurable (const Configurable &rhs)
 
 Configurable (Configurable &&rhs) noexcept
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Public Attributes

Parameter< RenderMode2dp_renderMode2d = {"renderMode2d", RenderMode2d::Intersection, this}
 
SubProperty< GlMeshRendererIntersection::DisplayOptionsp_intersectionRendering
 
Parameter< bool > p_showSurface = {"showSurface", true, this}
 
SubProperty< GlMeshRendererSurface::DisplayOptionsp_surfaceRendering = {"surfaceRendering", GlMeshRendererSurface::DisplayOptions(), this}
 
Parameter< bool > p_showContours = {"showContours", false, this}
 
SubProperty< GlMeshRendererContours::DisplayOptionsp_contourRendering = {"contourRendering", GlMeshRendererContours::DisplayOptions(), this}
 
Parameter< bool > p_showNormals = {"showNormals", false, this}
 
SubProperty< GlMeshRendererNormals::DisplayOptionsp_normalsRendering = {"normalsRendering", GlMeshRendererNormals::DisplayOptions(), this}
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Additional Inherited Members

- Protected Member Functions inherited from DataComponentBase
 DataComponentBase (const DataComponentBase &)=default
 
DataComponentBaseoperator= (const DataComponentBase &other)=default
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Enumeration Documentation

◆ RenderMode2d

Enumeration of options how a mesh should be shown in MPR views.

Enumerator
Intersection 

Render intersection with MPR plane only.

Surface 

Additionally render the mesh using MeshRendererSurface projected onto the MPR without any clipping.

SurfaceWithClipping 

Additionally render the mesh using MeshRendererSurface clipped against the MPR plane.

Member Function Documentation

◆ id()

std::string id ( ) const
inlineoverridevirtual

Returns a unique string identifier for this type of data component.

Note
To avoid conflicts make sure to include potential plugin names into this ID. Due to the modular architecture of the ImFusion library, uniqueness of IDs cannot be checked at compile time. However, DataComponentFactory will check the uniqueness of the ID during registration.

Implements DataComponentBase.

Member Data Documentation

◆ p_intersectionRendering

Initial value:
= {"intersectionRendering",
this}
Complete record of rendering options for GlMeshRendererIntersection.
Definition GlMeshRendererIntersection.h:39

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