![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GL/GlObject.h>
Abstract base class for an renderable OpenGL object that can be hosted in a GlView. More...
Inheritance diagram for GlObject: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.
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 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 Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
Additional Inherited Members | |
Public Attributes inherited from Configurable | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
| enum RenderingOrderGroup |
Enumeration to determine rendering order of GlObjects in GlSliceView and GlVolumeView.
Objects are to be rendered in ascending order according to their group.
|
pure virtual |
Draw the object in 3D space.
Implemented in BasicImageProcessingController, ConeBeamGeometryVisualisation, GlProjectiveAnnotation, GlProjectiveObject, CurvedViewSplineManipulator, OverlayAnnotation, DisplacementVisualizer, FreeformAnnotationManipulator, GlAngle, GlArrow, GlAxis, GlBall, GlBoundingBox, GlBox, GlCircle, GlCoordinateSystem, GlCrosshair, GlCurve, GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewOrthoSlice, GlCurvedViewPolyLine, GlCurvedViewSpline, GlCutLine, GlDeformationGrid, GlEllipse, GlFreeform, GlGraph, GlGrid, GlIcon, GlImageHighlighter, GlImageRenderer, GlInfiniteLine, GlInPlaneTransformer, GlIsolineRenderer, GlLabelRenderer, GlLine, GlLoop, GlMesh, GlMeshOutline, GlOutlineRenderer, GlParallelogram, GlPlane, GlPoint, GlPointCloud, GlPointTree, GlPolyLine, GlPoseGraph, GlRectangleBillboard, GlRotationTransformer, GlSlice, GlSliceIndicator, GlSmartSpline, GlSpline, GlText, GlTrackingSequence, GlTranslationTransformer, MeshManipulator, MeshPickingManipulator, PointCloudPickingManipulator, ProjectedAnatomicalStructure::ProjectiveObjectManager< T >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlGraph >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlMesh >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlMeshOutline >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlPoint >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlPointCloud >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlSpline >, RTStructureAnnotation, GlFanGeometry, GlFanWireframe, GlSweep3D, and GlUltrasoundRuler.
|
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 BasicImageProcessingController, ConeBeamGeometryVisualisation, GlProjectiveAnnotation, GlProjectiveObject, CurvedViewSplineManipulator, OverlayAnnotation, DisplacementVisualizer, FreeformAnnotationManipulator, GlBall, GlBoundingBox, GlCircle, GlCoordinateSystem, GlCrosshair, GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, GlCurvedViewSpline, GlDeformationGrid, GlGraph, GlGrid, GlIcon, GlImageHighlighter, GlImageRenderer, GlInPlaneTransformer, GlIsolineRenderer, GlLabelRenderer, GlLoop, GlMesh, GlMeshOutline, GlOutlineRenderer, GlParallelogram, GlPlane, GlPointBasedAnnotation, GlPointCloud, GlPoseGraph, GlRectangleBillboard, GlRotationTransformer, GlSlice, GlSliceIndicator, GlText, GlTrackingSequence, GlTranslationTransformer, GlTree, MeshManipulator, ProjectedAnatomicalStructure::ProjectiveObjectManager< T >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlGraph >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlMesh >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlMeshOutline >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlPoint >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlPointCloud >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlSpline >, RTStructureAnnotation, GlFanGeometry, GlFanWireframe, GlSweep3D, and GlUltrasoundRuler.
|
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 GlMesh.
|
virtual |
Set the modelview matrix of this object.
Reimplemented in GlCurvedViewOrthoSlice, GlLoop, GlMesh, GlPointBasedAnnotation, GlPointCloud, GlSlice, and GlTree.
|
virtual |
Return the modelview matrix.
Reimplemented in GlMesh, GlPointCloud, and GlTree.
|
virtual |
Set object visibility.
Reimplemented in CurvedViewSplineManipulator, GlLoop, and MeshManipulator.
|
virtual |
Set if object is always visible.
Reimplemented in GlLoop.
|
pure virtual |
Return unique identifier for this object class used for serialization.
Implemented in BasicImageProcessingController, ConeBeamGeometryVisualisation, GlProjectiveAnnotation, GlProjectiveObject, CurvedViewSplineManipulator, OverlayAnnotation, DisplacementVisualizer, FreeformAnnotationManipulator, GlAngle, GlArrow, GlAxis, GlBall, GlBoundingBox, GlBox, GlCircle, GlCoordinateSystem, GlCrosshair, GlCurve, GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, GlCurvedViewSpline, GlCutLine, GlDeformationGrid, GlEllipse, GlFreeform, GlGraph, GlGrid, GlIcon, GlImageHighlighter, GlImageRenderer, GlInfiniteLine, GlInPlaneTransformer, GlIsolineRenderer, GlLabelRenderer, GlLine, GlLoop, GlMesh, GlMeshOutline, GlOutlineRenderer, GlParallelogram, GlPlane, GlPoint, GlPointCloud, GlPointTree, GlPolyLine, GlPoseGraph, GlRectangle, GlRectangleBillboard, GlRotationTransformer, GlSlice, GlSliceIndicator, GlSmartSpline, GlSpline, GlText, GlTrackingSequence, GlTranslationTransformer, GlTree, MeshManipulator, ProjectedAnatomicalStructure::ProjectiveObjectManager< T >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlGraph >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlMesh >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlMeshOutline >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlPoint >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlPointCloud >, ProjectedAnatomicalStructure::ProjectiveObjectManager< ImFusion::GlSpline >, RTStructureAnnotation, GlFanGeometry, GlFanWireframe, GlSweep3D, and GlUltrasoundRuler.
|
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.
Reimplemented from Configurable.
Reimplemented in GlParallelogram, GlPlane, GlPointBasedAnnotation, GlPointCloud, GlRectangleBillboard, GlSpline, and GlTransformerObject.
|
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.
Reimplemented from Configurable.
Reimplemented in GlParallelogram, GlPlane, GlPointBasedAnnotation, GlPointCloud, GlRectangleBillboard, GlSpline, and GlTransformerObject.
|
protected |
Draw 3D objects in 2D views. This is to render 3D objects in projective 2D views. Property is not serialized.