ImFusion C++ SDK 4.4.0
ImFusion::GlObject Class Referenceabstract

#include <ImFusion/GL/GlObject.h>

Abstract base class for an renderable OpenGL object that can be hosted in a GlView. More...

Inheritance diagram for ImFusion::GlObject:

Detailed Description

Abstract base class for an renderable OpenGL object that can be hosted in a GlView.

In contrast to a GlOverlay, a GlObject reside in world space and is rendered as part of the scene of the hosting GlView. If you do not require user interaction with the GlObject, you can add it directly to a GlView. Alternatively, you can wrap it in an InteractiveObject pairing it with a Manipulator and then add it to the corresponding InteractiveView.

See also
InteractiveObject
Examples
MyCustomGlObject.h.

Public Types

enum  RenderingOrderGroup { RenderingGroupRest , RenderingGroupMesh , RenderingGroupManipulator }
 Enumeration to determine rendering order of GlObjects in GlSliceView and GlVolumeView. More...

Public Member Functions

virtual void draw (const GlView &view)=0
 Draw the object in 3D space.
virtual Geometry::AlignedBox bounds () const =0
 Get the axis-aligned bounding box of this GlObject in world space.
virtual Geometry::AlignedBox boundsSpherical () const
 Get the spherical bounds of this GlObject in world space.
virtual void setMatrix (const mat4 &m)
 Set the modelview matrix of this object.
virtual const mat4 & matrix () const
 Return the modelview matrix.
virtual void setVisible (bool visible)
 Set object visibility.
virtual bool visible () const
 Return object visibility.
virtual void setAlwaysVisible (bool alwaysVisible)
 Set if object is always visible.
virtual bool alwaysVisible () const
 Return if object is always visible.
virtual std::string typeName () const =0
 Return unique identifier for this object class used for serialization.
RenderingOrderGroup renderingOrder () const
 Return current rendering order value for this GlObject.
void setRenderingOrder (RenderingOrderGroup group)
 Set rendering order value for this GlObject.
void setDraw3DIn2DView (bool draw3DIn2DView)
void configure (const Properties *p) override
 Configure this object instance by de-serializing the given Properties.
void configuration (Properties *p) const override
 Serialize the current object configuration into the given Properties object.
Public Member Functions inherited from ImFusion::Configurable
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
Configurable & operator= (const Configurable &)
Configurable & operator= (Configurable &&) noexcept

Protected Attributes

mat4 m_matrix = mat4::Identity()
 Modelview transformation matrix of this object.
bool m_visible = true
 Object visibility.
bool m_alwaysVisible = false
 Object always visible.
bool m_draw3DIn2DView
 Draw 3D objects in 2D views. This is to render 3D objects in projective 2D views. Property is not serialized.
RenderingOrderGroup m_renderingOrder = RenderingGroupRest
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Additional Inherited Members

Public Attributes inherited from ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.

Member Enumeration Documentation

◆ RenderingOrderGroup

Enumeration to determine rendering order of GlObjects in GlSliceView and GlVolumeView.

Objects are to be rendered in ascending order according to their group.

Enumerator
RenderingGroupRest 

This group will be rendered first.

RenderingGroupMesh 

This group will be rendered after the rest since meshes might be transparent.

RenderingGroupManipulator 

This group will be rendered last since to avoid manipulators to be hidden by other objects.

Member Function Documentation

◆ draw()

virtual void ImFusion::GlObject::draw ( const GlView & view)
pure virtual

Draw the object in 3D space.

Implemented in ImFusion::BasicImageProcessingController, ImFusion::CT::ConeBeamGeometryVisualisation, ImFusion::CT::GlProjectiveAnnotation, ImFusion::CT::GlProjectiveObject, ImFusion::CurvedViewSplineManipulator, ImFusion::Dicom::OverlayAnnotation, ImFusion::DisplacementVisualizer, ImFusion::FreeformAnnotationManipulator, ImFusion::GlAngle, ImFusion::GlArrow, ImFusion::GlAxis, ImFusion::GlBall, ImFusion::GlBoundingBox, ImFusion::GlBox, ImFusion::GlCircle, ImFusion::GlCoordinateSystem, ImFusion::GlCrosshair, ImFusion::GlCurve, ImFusion::GlCurvedViewCircle, ImFusion::GlCurvedViewEllipse, ImFusion::GlCurvedViewOrthoSlice, ImFusion::GlCurvedViewPolyLine, ImFusion::GlCurvedViewSpline, ImFusion::GlCutLine, ImFusion::GlDeformationGrid, ImFusion::GlEllipse, ImFusion::GlFreeform, ImFusion::GlGraph, ImFusion::GlGrid, ImFusion::GlIcon, ImFusion::GlImageHighlighter, ImFusion::GlImageRenderer, ImFusion::GlInfiniteLine, ImFusion::GlInPlaneTransformer, ImFusion::GlIsolineRenderer, ImFusion::GlLabelRenderer, ImFusion::GlLine, ImFusion::GlLoop, ImFusion::GlMesh, ImFusion::GlMeshOutline, ImFusion::GlOutlineRenderer, ImFusion::GlParallelogram, ImFusion::GlPlane, ImFusion::GlPoint, ImFusion::GlPointCloud, ImFusion::GlPointTree, ImFusion::GlPolyLine, ImFusion::GlPoseGraph, ImFusion::GlRectangleBillboard, ImFusion::GlRotationTransformer, ImFusion::GlSlice, ImFusion::GlSliceIndicator, ImFusion::GlSmartSpline, ImFusion::GlSpline, ImFusion::GlText, ImFusion::GlTrackingSequence, ImFusion::GlTrackingSequenceLegacy, ImFusion::GlTranslationTransformer, ImFusion::MeshManipulator, ImFusion::MeshPickingManipulator, ImFusion::PointCloudPickingManipulator, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< T >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlGraph >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlMesh >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlMeshOutline >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlPoint >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlPointCloud >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlSpline >, ImFusion::RTStructureAnnotation, ImFusion::US::GlFanGeometry, ImFusion::US::GlFanWireframe, ImFusion::US::GlSweep3D, and ImFusion::US::GlUltrasoundRuler.

Examples
MyCustomGlObject.h.

◆ bounds()

virtual Geometry::AlignedBox ImFusion::GlObject::bounds ( ) const
pure virtual

Get the axis-aligned bounding box of this GlObject in world space.

Return an empty (default-constructed) AlignedBox object if the GlObject does not reside in world space.

Implemented in ImFusion::BasicImageProcessingController, ImFusion::CT::ConeBeamGeometryVisualisation, ImFusion::CT::GlProjectiveAnnotation, ImFusion::CT::GlProjectiveObject, ImFusion::CurvedViewSplineManipulator, ImFusion::Dicom::OverlayAnnotation, ImFusion::DisplacementVisualizer, ImFusion::FreeformAnnotationManipulator, ImFusion::GlBall, ImFusion::GlBoundingBox, ImFusion::GlCircle, ImFusion::GlCoordinateSystem, ImFusion::GlCrosshair, ImFusion::GlCurvedViewCircle, ImFusion::GlCurvedViewEllipse, ImFusion::GlCurvedViewPolyLine, ImFusion::GlCurvedViewSpline, ImFusion::GlDeformationGrid, ImFusion::GlGraph, ImFusion::GlGrid, ImFusion::GlIcon, ImFusion::GlImageHighlighter, ImFusion::GlImageRenderer, ImFusion::GlInPlaneTransformer, ImFusion::GlIsolineRenderer, ImFusion::GlLabelRenderer, ImFusion::GlLoop, ImFusion::GlMesh, ImFusion::GlMeshOutline, ImFusion::GlOutlineRenderer, ImFusion::GlParallelogram, ImFusion::GlPlane, ImFusion::GlPointBasedAnnotation, ImFusion::GlPointCloud, ImFusion::GlPoseGraph, ImFusion::GlRectangleBillboard, ImFusion::GlRotationTransformer, ImFusion::GlSlice, ImFusion::GlSliceIndicator, ImFusion::GlText, ImFusion::GlTrackingSequence, ImFusion::GlTrackingSequenceLegacy, ImFusion::GlTranslationTransformer, ImFusion::GlTree, ImFusion::MeshManipulator, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< T >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlGraph >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlMesh >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlMeshOutline >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlPoint >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlPointCloud >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlSpline >, ImFusion::RTStructureAnnotation, ImFusion::US::GlFanGeometry, ImFusion::US::GlFanWireframe, ImFusion::US::GlSweep3D, and ImFusion::US::GlUltrasoundRuler.

Examples
MyCustomGlObject.h.

◆ boundsSpherical()

virtual Geometry::AlignedBox ImFusion::GlObject::boundsSpherical ( ) const
virtual

Get the spherical bounds of this GlObject in world space.

Return an empty (default-constructed) Geometry::AlignedBox object if the GlObject does not reside in world space. This may be cheaper to compute than the axis-aligned bounding box for a moving object.

Reimplemented in ImFusion::GlMesh.

◆ setMatrix()

virtual void ImFusion::GlObject::setMatrix ( const mat4 & m)
virtual

◆ matrix()

virtual const mat4 & ImFusion::GlObject::matrix ( ) const
virtual

Return the modelview matrix.

Reimplemented in ImFusion::GlMesh, ImFusion::GlPointCloud, and ImFusion::GlTree.

◆ setVisible()

virtual void ImFusion::GlObject::setVisible ( bool visible)
virtual

◆ setAlwaysVisible()

virtual void ImFusion::GlObject::setAlwaysVisible ( bool alwaysVisible)
virtual

Set if object is always visible.

Reimplemented in ImFusion::GlLoop.

◆ typeName()

virtual std::string ImFusion::GlObject::typeName ( ) const
pure virtual

Return unique identifier for this object class used for serialization.

Implemented in ImFusion::BasicImageProcessingController, ImFusion::CT::ConeBeamGeometryVisualisation, ImFusion::CT::GlProjectiveAnnotation, ImFusion::CT::GlProjectiveObject, ImFusion::CurvedViewSplineManipulator, ImFusion::Dicom::OverlayAnnotation, ImFusion::DisplacementVisualizer, ImFusion::FreeformAnnotationManipulator, ImFusion::GlAngle, ImFusion::GlArrow, ImFusion::GlAxis, ImFusion::GlBall, ImFusion::GlBoundingBox, ImFusion::GlBox, ImFusion::GlCircle, ImFusion::GlCoordinateSystem, ImFusion::GlCrosshair, ImFusion::GlCurve, ImFusion::GlCurvedViewCircle, ImFusion::GlCurvedViewEllipse, ImFusion::GlCurvedViewPolyLine, ImFusion::GlCurvedViewSpline, ImFusion::GlCutLine, ImFusion::GlDeformationGrid, ImFusion::GlEllipse, ImFusion::GlFreeform, ImFusion::GlGraph, ImFusion::GlGrid, ImFusion::GlIcon, ImFusion::GlImageHighlighter, ImFusion::GlImageRenderer, ImFusion::GlInfiniteLine, ImFusion::GlInPlaneTransformer, ImFusion::GlIsolineRenderer, ImFusion::GlLabelRenderer, ImFusion::GlLine, ImFusion::GlLoop, ImFusion::GlMesh, ImFusion::GlMeshOutline, ImFusion::GlOutlineRenderer, ImFusion::GlParallelogram, ImFusion::GlPlane, ImFusion::GlPoint, ImFusion::GlPointCloud, ImFusion::GlPointTree, ImFusion::GlPolyLine, ImFusion::GlPoseGraph, ImFusion::GlRectangle, ImFusion::GlRectangleBillboard, ImFusion::GlRotationTransformer, ImFusion::GlSlice, ImFusion::GlSliceIndicator, ImFusion::GlSmartSpline, ImFusion::GlSpline, ImFusion::GlText, ImFusion::GlTrackingSequence, ImFusion::GlTrackingSequenceLegacy, ImFusion::GlTranslationTransformer, ImFusion::GlTree, ImFusion::MeshManipulator, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< T >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlGraph >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlMesh >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlMeshOutline >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlPoint >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlPointCloud >, ImFusion::ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlSpline >, ImFusion::RTStructureAnnotation, ImFusion::US::GlFanGeometry, ImFusion::US::GlFanWireframe, ImFusion::US::GlSweep3D, and ImFusion::US::GlUltrasoundRuler.

Examples
MyCustomGlObject.h.

◆ configure()

void ImFusion::GlObject::configure ( const Properties * p)
overridevirtual

Configure this object instance by de-serializing the given Properties.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configuration() for the inverse functionality

Reimplemented from ImFusion::Configurable.

Reimplemented in ImFusion::GlParallelogram, ImFusion::GlPlane, ImFusion::GlPointBasedAnnotation, ImFusion::GlPointCloud, ImFusion::GlRectangleBillboard, ImFusion::GlSpline, and ImFusion::GlTransformerObject.

◆ configuration()

void ImFusion::GlObject::configuration ( Properties * p) const
overridevirtual

Serialize the current object configuration into the given Properties object.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configure() for the inverse functionality

Reimplemented from ImFusion::Configurable.

Reimplemented in ImFusion::GlParallelogram, ImFusion::GlPlane, ImFusion::GlPointBasedAnnotation, ImFusion::GlPointCloud, ImFusion::GlRectangleBillboard, ImFusion::GlSpline, and ImFusion::GlTransformerObject.

Member Data Documentation

◆ m_draw3DIn2DView

bool ImFusion::GlObject::m_draw3DIn2DView
protected
Initial value:
=
false

Draw 3D objects in 2D views. This is to render 3D objects in projective 2D views. Property is not serialized.


The documentation for this class was generated from the following file:
  • ImFusion/GL/GlObject.h
Search Tab / S to search, Esc to close