MeVisLab Toolbox Reference
SoCSOEditorExtension Class Referenceabstract

Base class for an editor extension for the SoView2DCSOExtensibleEditor. More...

#include <SoCSOEditorExtension.h>

Inheritance diagram for SoCSOEditorExtension:
SoCSOAnnotationDeviceCoordinates SoCSOBulgeEditor SoCSOCreatorEditorExtension SoCSODefaultRenderer SoCSOGeneralRendererEditorExtension SoCSOImageStatistics SoCSOLabelRenderer SoCSOModifyEditor SoCSOTransformEditor

Public Member Functions

void setExtensibleEditor (SoView2DCSOExtensibleEditor *extensibleEditor)
 Sets the pointer to the calling extensible editor.
 
virtual void activate (SoView2DCSOExtensibleEditor *extensibleEditor)
 Is called when an extension is activated by the SoView2DExtensibleEditor.
 
virtual void deactivate ()
 Is called when an extension is deactivated by the SoView2DExtensibleEditor.
 
virtual void buttonMaskChanged ()
 Is called when the button mask of the SoView2DExtensibleEditor has changed.
 
virtual void editingOnChanged ()
 Is called when the editingOn field of the SoView2DExtensibleEditor has changed.
 
virtual void startDrawing (View2DSliceList *)
 Is called before drawing.
 
virtual void drawingDone ()
 Is called when all drawing is done.
 
virtual void setVisibleCSOs (const std::vector< CSODrawCSOInfos > &drawCSOInformation, const CSODrawView2DInfos &view2DInfos, SoView2DCSOExtensibleEditor *editor)
 Sets visible CSOs that have been determined in the extensible editor.
 
virtual void draw (const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const CSODrawSliceInformation &sliceInfo, SoView2DCSOExtensibleEditor *editor)
 Main routine for drawing a CSO.
 
virtual void drawSecondPass (const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const CSODrawSliceInformation &sliceInfo, SoView2DCSOExtensibleEditor *editor)
 Drawing routine that comes between 'main' and 'overlay'.
 
virtual void drawOverlay (const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const CSODrawSliceInformation &sliceInfo, SoView2DCSOExtensibleEditor *editor)
 Routine for drawing after the main routine has drawn.
 
virtual void drawAdditionalGeometry (const CSODrawView2DInfos &view2DInfos, SoView2DCSOExtensibleEditor *editor)
 Routine for drawing additional geometry of the extension.
 
virtual void createStartPressAt (const SoPointerPosition &pos)=0
 
virtual void createDragMoveTo (const SoPointerPosition &pos)=0
 
virtual bool createEndPress (int clickCount)=0
 
virtual void pointerPositionIfAllowedAt (const SoPointerPosition &pos)=0
 Sets seed points while moving the mouse – but not while dragging.
 
virtual void selectAndMoveStartPressAt (const SoPointerPosition &pos)=0
 
virtual void selectAndMoveDragMoveTo (const SoPointerPosition &pos)=0
 
virtual SoPointingActionselectAndMoveEndPress (int clickCount)=0
 
virtual void insertSeedPointStartPressAt (const SoPointerPosition &)
 
virtual void insertSeedPointDragMoveTo (const SoPointerPosition &)
 
virtual SoPointingActioninsertSeedPointEndPress (int)
 
virtual void bulgeStartPressAt (const SoPointerPosition &)
 
virtual void bulgeDragMoveTo (const SoPointerPosition &)
 
virtual SoPointingActionbulgeEndPress (int)
 
virtual void pointerPosition (const SoPointerPosition &)
 Is called when the mouse moves over a viewer.
 
virtual void pointerLeftWindow ()
 Is called when mouse pointer leaves the window.
 
virtual bool isCreationAllowed () const
 Returns whether the editor is allowed to create a new CSO.
 
virtual bool isCreationAllowedAt (const SoPointerPosition &) const
 Returns whether the editor is allowed to create a new CSO at the given position, by default calls the previous method.
 
virtual bool isModificationAllowed () const
 Returns whether the editor is allowed to modify an existing CSO.
 
virtual bool shouldRenderCSOs () const
 Returns whether the editor should render.
 
virtual bool canCreateCSOs () const
 Returns whether the editor can create a CSO.
 
virtual ml::CSOgetActiveCSO () const
 Returns the currently active CSO.
 
virtual bool expectsToCreateCSO ()
 Returns whether an editor is awaiting to create a new CSO, depending on the requireMousemovement flag.
 
SbString getCreatorExtensionId () const
 
void setActiveCSOList (ml::CSOList *hitCSOList)
 
void setSelectAndMoveInformation (ml::CSOList *hitCSOList, ml::CSO *hitCSO, ml::CSOSeedPoint *hitSeedPoint, ml::CSOPathPoints *hitPathPoints, float hitDistance)
 
void setCSOUnderMouse (ml::CSO *cso)
 
ml::CSOgetCSOUnderMouse () const
 
bool hasSelectedSeedPoint () const
 
bool hasSelectedCSO () const
 
virtual SbString getSubType () const
 Returns the sub type string of the derived class.
 
virtual bool shouldRenderSpecific (ml::CSO *cso) const
 Returns whether a given CSO should be rendered by this specific extension.
 
virtual bool shouldRenderGeneral (ml::CSO *) const
 Returns whether a given CSO should be rendered by this general extension.
 
virtual bool isDefaultRenderer () const
 Returns whether the editor is the default editor.
 
virtual bool isModificationEditor () const
 Returns whether the editor is a modification editor.
 
virtual void resetCache ()
 Resets internal module caches, if there are any.
 
virtual void cancel ()
 Cancels an action like generating a CSO. Depends on concrete editor.
 
virtual int cursorShape () const
 Returns the cursor shape that indicates the next creation.
 
virtual bool deleteSeedPoint (ml::CSO *cso, ml::CSOSeedPoint *)
 Removes the given seed point from the given CSO and returns whether that was successful.
 
ml::CSOSeedPointgetPreviousSeedPoint (ml::CSOSeedPoint *seedPoint) const
 Returns the previous seed point of the given seed point for setting it as the next selected seed point.
 
virtual void mouseWheelEventReceived (SoMouseWheelEvent::Orientation, int, View2DEvent *)
 Method is called when the extensible editor received a mouse wheel event.
 
virtual bool evaluateHitPoint (const ml::Vector3 &worldPosition, View2DSliceList *slicelist, ml::CSOList *csoList, const ml::CSOBoundingBox &slabBB, SoView2DCSOExtensibleEditor *editor, ml::CSO *&localHitCSO, ml::CSOSeedPoint *&localHitSeedPoint, ml::CSOPathPoints *&localHitPathPoints, float &distance)
 Returns whether the given world position is within the selection distance set in the editor and fills the selection distance.
 
void reset ()
 
ml::CSOVisualizationSettingsgetVisualizationSettings ()
 Returns a pointer to the visual settings that are either the default ones or the ones set to the extensible editor (if present).
 
bool shouldShowCSOForCurrentTimePoint (const CSODrawView2DInfos &view2DInfos, ml::CSO *cso)
 Returns whether the given CSO should be rendered for the current time point.
 
void sendCSOEventsOnCancel (ml::CSO *cso)
 Sends CSO events for completing a creation or interaction when canceling it.
 
virtual void sendCSOEventsOnCancel (ml::CSOList *csoList)
 

Static Public Member Functions

static void initClass ()
 init class in inventor runtime
 

Public Attributes

SoSFString extensionId
 ID for a editor, needs to be unique per editor extension instance.
 
SoSFBool allowCreation
 Shall the editor allow creation?
 
SoSFBool allowModification
 Shall the editor allow modification of CSOs of its type?
 
SoSFBool allowSeedPointInteraction
 Should the interaction with seed points be allowed?
 
SoSFBool shouldRender
 Shall the editor render its CSOs?
 
SoSFMLBase inVisualizationSettings
 Optionally attached visualization settings, overrides the vis.
 
SoSFEnum selectionCursor
 
SoSFEnum interactionForbiddenCursor
 
SoSFInt32 csoIdUnderMouseCursor
 The id of the CSO currently under the mouse (or -1 if no CSO is under the mouse).
 

Protected Member Functions

 SoCSOEditorExtension ()
 Hidden constructor.
 
 ~SoCSOEditorExtension () override
 Hidden destructor.
 
virtual void initMembers ()
 
void sendCSONotificationRepaint ()
 Sends a CSO notification to repaint the CSOList.
 
void sendCSONotificationMove ()
 Sends a CSO notification on moving a CSO or seed point.
 
void sendCSONotificationFinishInteraction ()
 Sends a CSO notification on finishing an interaction with a CSO.
 
void sendCSONotificationResetInteractionState ()
 Sends a CSO notification on having the interaction state being reset.
 
void sendCSONotificationInsertSeedPoint ()
 Sends a CSO notification on inserting a seed point.
 
void sendCSONotificationNewCSOStarted ()
 Sends a CSO notification on having started to create a new CSO.
 
void setExtensionIdAsSubType ()
 Sets the subtype member to the value of the extension id string.
 
virtual void setCreationData (const SoPointerPosition &pos, ml::CSO *newCSO)
 Sets creation data to a newly created CSO.
 
void extensionIdCB (SoField *)
 
SoCSOEditorTools::LineRenderSettings getLineRenderSettingsOnSlice ()
 Creates a LineRenderSettings struct from the editors visualization settings "onSlice" section.
 
SoCSOEditorTools::LineRenderSettings getLineRenderSettingsForCSO (ml::CSO *cso)
 Creates a LineRenderSettings struct from the visualization attributes of the given CSO.
 
void drawPathPoints (const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const CSODrawSliceInformation &drawSliceInfo, const SbVec2f &shadowOffsetDevice, SoView2DCSOExtensibleEditor *editor)
 Draws the CSO by drawing lines between the path points. Renders different types of CSOs.
 
void renderPathPoints (const CSOPathPointsRenderSettings &renderSettings, const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const std::vector< CSOSliceCrossing > &pathPointsLists, GLint lineMode, const SbVec2f &shadowOffsetDevice)
 Draws path points with given render settings.
 
void drawPathAndCrossingPoints (const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const SbVec2f &shadowOffsetDevice, const std::vector< CSOSliceCrossing > &pathAndCrossingPoints, GLint lineMode)
 Draws the path and crossing points.
 
void drawShape (int style, SoView2DCSOExtensibleEditor *editor, ml::CSOVisualizationSettings *visualizationSettings, float deviceX, float deviceY, float size, float lineWidth=1.f)
 Draws the shape with the given style with the given center and size.
 
void drawSeedPoints (const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const CSODrawSliceInformation &drawSliceInfo, SoView2DCSOExtensibleEditor *editor)
 Draws the seed points of the CSO.
 
void drawFixedSizeCircleAt (float deviceX, float deviceY)
 Renders a fixed size circle at the given position.
 
bool isCSOVisible (const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const CSODrawSliceInformation &drawSliceInfo, SoView2DCSOExtensibleEditor *editor)
 Returns whether the CSO is visible on the current slice.
 
ml::Vector3 getTransformedPosition (const CSODrawView2DInfos &view2DInfos, const ml::Vector3 &position)
 If a SoCSOTransform exists, this method returns the transformed position.
 
void mapWorldToDevice (const SoPointerPosition &pos, const ml::Vector3 &worldPosition, float &deviceX, float &deviceY)
 Returns device coordinates for a given world position.
 
void mapWorldToDevice (View2DSliceList *slicelist, const ml::Vector3 &worldPosition, float &deviceX, float &deviceY)
 Returns device coordinates for a given world position.
 
ml::Vector3 mapDeviceToWorld (const SoPointerPosition &pos, float deviceX, float deviceY)
 Returns world coordinates for given device position.
 
ml::Vector3 mapWorldToVoxel (const SoPointerPosition &pos, const ml::Vector3 &worldPosition)
 Returns a voxel position for a given world position.
 
ml::Vector3 mapWorldToVoxel (const SoPointerPosition &pos, const SbVec3f &worldPosition)
 Returns a voxel position for a given world position.
 
ml::Vector3 mapVoxelToWorld (const SoPointerPosition &pos, const ml::Vector3 &voxelPosition)
 Returns a world position for a given voxel position.
 
SbVec2f nonShadowOffset () const
 Returns the default offset for non-shadows in pixels.
 
SbVec2f shadowOffset () const
 Returns the default offset for shadows in pixels.
 
GLint getLineMode (ml::CSO *cso)
 Returns the correct line mode for open and for closed CSOs.
 
void setupGLForCSO (const CSODrawCSOInfos &csoInfos)
 Sets up GL state for color, line width, and point size.
 
void setupGLShadow (float generalAlpha=1.0f)
 Sets up the GL state for shadow rendering (color and line width).
 
void glSetAlpha (float alpha)
 Sets an alpha value but retains the set color.
 
float getDepthAlpha (int maxSliceDistance, int currentSliceDistance) const
 Returns an alpha factor based on the max distance and the current distance.
 
bool doesCSOTimePointMatchCurrentTimePoint (const CSODrawView2DInfos &view2DInfos, ml::CSO *cso)
 Returns true if the CSO's time point matches the (overwritten) current time point.
 

Protected Attributes

SoView2DCSOExtensibleEditor_editor
 
ml::CSOListPtr _hitCSOList
 Pointer to internal/interactive states.
 
ml::CSO_hitCSO
 
ml::CSOSeedPoint_hitSeedPoint
 
ml::CSOPathPoints_hitPathPoints
 
float _hitDistance
 
ml::CSO_csoUnderMouse
 
ml::CSOVisualizationSettings _visualizationSettings
 Default visual settings. Access them via the method getVisualSettings().
 
SbString _subType
 Member for subtype of generated CSOs.
 

Detailed Description

Base class for an editor extension for the SoView2DCSOExtensibleEditor.

An editor extension can render and generate/modify only specific types of CSOs.

Definition at line 38 of file SoCSOEditorExtension.h.

Constructor & Destructor Documentation

◆ SoCSOEditorExtension()

SoCSOEditorExtension::SoCSOEditorExtension ( )
protected

Hidden constructor.

◆ ~SoCSOEditorExtension()

SoCSOEditorExtension::~SoCSOEditorExtension ( )
overrideprotected

Hidden destructor.

Member Function Documentation

◆ activate()

virtual void SoCSOEditorExtension::activate ( SoView2DCSOExtensibleEditor * extensibleEditor)
inlinevirtual

Is called when an extension is activated by the SoView2DExtensibleEditor.

Can be overwritten to register private actions or change triggers. Must call superclass method!

Definition at line 55 of file SoCSOEditorExtension.h.

References mlrange_cast().

◆ bulgeDragMoveTo()

virtual void SoCSOEditorExtension::bulgeDragMoveTo ( const SoPointerPosition & )
inlinevirtual

Reimplemented in SoCSOBulgeEditor.

Definition at line 106 of file SoCSOEditorExtension.h.

◆ bulgeEndPress()

virtual SoPointingAction * SoCSOEditorExtension::bulgeEndPress ( int )
inlinevirtual

Reimplemented in SoCSOBulgeEditor.

Definition at line 107 of file SoCSOEditorExtension.h.

◆ bulgeStartPressAt()

virtual void SoCSOEditorExtension::bulgeStartPressAt ( const SoPointerPosition & )
inlinevirtual

Reimplemented in SoCSOBulgeEditor.

Definition at line 105 of file SoCSOEditorExtension.h.

◆ buttonMaskChanged()

virtual void SoCSOEditorExtension::buttonMaskChanged ( )
inlinevirtual

Is called when the button mask of the SoView2DExtensibleEditor has changed.

Can be overwritten to change triggers of private actions.

Definition at line 61 of file SoCSOEditorExtension.h.

◆ cancel()

virtual void SoCSOEditorExtension::cancel ( )
inlinevirtual

◆ canCreateCSOs()

virtual bool SoCSOEditorExtension::canCreateCSOs ( ) const
inlinevirtual

Returns whether the editor can create a CSO.

Reimplemented in SoCSOModifyEditor, and SoCSOCreatorEditorExtension.

Definition at line 123 of file SoCSOEditorExtension.h.

◆ createDragMoveTo()

◆ createEndPress()

◆ createStartPressAt()

◆ cursorShape()

virtual int SoCSOEditorExtension::cursorShape ( ) const
inlinevirtual

◆ deactivate()

virtual void SoCSOEditorExtension::deactivate ( )
inlinevirtual

Is called when an extension is deactivated by the SoView2DExtensibleEditor.

Can be overwritten to unregister private actions or restore triggers.

Definition at line 58 of file SoCSOEditorExtension.h.

◆ deleteSeedPoint()

virtual bool SoCSOEditorExtension::deleteSeedPoint ( ml::CSO * cso,
ml::CSOSeedPoint *  )
virtual

Removes the given seed point from the given CSO and returns whether that was successful.

Reimplemented in SoCSOAngleEditor, SoCSODistanceLineEditor, SoCSODistancePolylineEditor, SoCSOLiveWireEditor, SoCSOPolygonEditor, and SoCSOSplineEditor.

◆ doesCSOTimePointMatchCurrentTimePoint()

bool SoCSOEditorExtension::doesCSOTimePointMatchCurrentTimePoint ( const CSODrawView2DInfos & view2DInfos,
ml::CSO * cso )
protected

Returns true if the CSO's time point matches the (overwritten) current time point.

◆ draw()

◆ drawAdditionalGeometry()

virtual void SoCSOEditorExtension::drawAdditionalGeometry ( const CSODrawView2DInfos & view2DInfos,
SoView2DCSOExtensibleEditor * editor )
virtual

Routine for drawing additional geometry of the extension.

Reimplemented in SoCSOModifyEditor.

◆ drawFixedSizeCircleAt()

void SoCSOEditorExtension::drawFixedSizeCircleAt ( float deviceX,
float deviceY )
protected

Renders a fixed size circle at the given position.

◆ drawingDone()

virtual void SoCSOEditorExtension::drawingDone ( )
inlinevirtual

Is called when all drawing is done.

Reimplemented in SoCSOAnnotationDeviceCoordinates.

Definition at line 69 of file SoCSOEditorExtension.h.

◆ drawOverlay()

virtual void SoCSOEditorExtension::drawOverlay ( const CSODrawCSOInfos & csoInfos,
const CSODrawView2DInfos & view2DInfos,
const CSODrawSliceInformation & sliceInfo,
SoView2DCSOExtensibleEditor * editor )
virtual

Routine for drawing after the main routine has drawn.

Use this for geometry depending on the CSO that needs to be drawn over what 'draw' has rendered.

Reimplemented in SoCSOLabelRenderer.

◆ drawPathAndCrossingPoints()

void SoCSOEditorExtension::drawPathAndCrossingPoints ( const CSODrawCSOInfos & csoInfos,
const CSODrawView2DInfos & view2DInfos,
const SbVec2f & shadowOffsetDevice,
const std::vector< CSOSliceCrossing > & pathAndCrossingPoints,
GLint lineMode )
protected

Draws the path and crossing points.

◆ drawPathPoints()

void SoCSOEditorExtension::drawPathPoints ( const CSODrawCSOInfos & csoInfos,
const CSODrawView2DInfos & view2DInfos,
const CSODrawSliceInformation & drawSliceInfo,
const SbVec2f & shadowOffsetDevice,
SoView2DCSOExtensibleEditor * editor )
protected

Draws the CSO by drawing lines between the path points. Renders different types of CSOs.

◆ drawSecondPass()

virtual void SoCSOEditorExtension::drawSecondPass ( const CSODrawCSOInfos & csoInfos,
const CSODrawView2DInfos & view2DInfos,
const CSODrawSliceInformation & sliceInfo,
SoView2DCSOExtensibleEditor * editor )
virtual

Drawing routine that comes between 'main' and 'overlay'.

Reimplemented in SoCSOLabelRenderer.

◆ drawSeedPoints()

void SoCSOEditorExtension::drawSeedPoints ( const CSODrawCSOInfos & csoInfos,
const CSODrawView2DInfos & view2DInfos,
const CSODrawSliceInformation & drawSliceInfo,
SoView2DCSOExtensibleEditor * editor )
protected

Draws the seed points of the CSO.

◆ drawShape()

void SoCSOEditorExtension::drawShape ( int style,
SoView2DCSOExtensibleEditor * editor,
ml::CSOVisualizationSettings * visualizationSettings,
float deviceX,
float deviceY,
float size,
float lineWidth = 1.f )
protected

Draws the shape with the given style with the given center and size.

◆ editingOnChanged()

virtual void SoCSOEditorExtension::editingOnChanged ( )
inlinevirtual

Is called when the editingOn field of the SoView2DExtensibleEditor has changed.

Can be overwritten to enable or disable triggers of private actions.

Definition at line 64 of file SoCSOEditorExtension.h.

◆ evaluateHitPoint()

virtual bool SoCSOEditorExtension::evaluateHitPoint ( const ml::Vector3 & worldPosition,
View2DSliceList * slicelist,
ml::CSOList * csoList,
const ml::CSOBoundingBox & slabBB,
SoView2DCSOExtensibleEditor * editor,
ml::CSO *& localHitCSO,
ml::CSOSeedPoint *& localHitSeedPoint,
ml::CSOPathPoints *& localHitPathPoints,
float & distance )
virtual

Returns whether the given world position is within the selection distance set in the editor and fills the selection distance.

Reimplemented in SoCSOModifyEditor, and SoCSOTransformEditor.

◆ expectsToCreateCSO()

virtual bool SoCSOEditorExtension::expectsToCreateCSO ( )
inlinevirtual

Returns whether an editor is awaiting to create a new CSO, depending on the requireMousemovement flag.

Reimplemented in SoCSOLineCreatorEditorExtension.

Definition at line 129 of file SoCSOEditorExtension.h.

◆ extensionIdCB()

void SoCSOEditorExtension::extensionIdCB ( SoField * )
protected

◆ getActiveCSO()

virtual ml::CSO * SoCSOEditorExtension::getActiveCSO ( ) const
inlinevirtual

Returns the currently active CSO.

Reimplemented in SoCSOCreatorEditorExtension.

Definition at line 125 of file SoCSOEditorExtension.h.

◆ getCreatorExtensionId()

SbString SoCSOEditorExtension::getCreatorExtensionId ( ) const
inline

Definition at line 131 of file SoCSOEditorExtension.h.

◆ getCSOUnderMouse()

ml::CSO * SoCSOEditorExtension::getCSOUnderMouse ( ) const
inline

Definition at line 136 of file SoCSOEditorExtension.h.

◆ getDepthAlpha()

float SoCSOEditorExtension::getDepthAlpha ( int maxSliceDistance,
int currentSliceDistance ) const
protected

Returns an alpha factor based on the max distance and the current distance.

◆ getLineMode()

GLint SoCSOEditorExtension::getLineMode ( ml::CSO * cso)
protected

Returns the correct line mode for open and for closed CSOs.

◆ getLineRenderSettingsForCSO()

SoCSOEditorTools::LineRenderSettings SoCSOEditorExtension::getLineRenderSettingsForCSO ( ml::CSO * cso)
protected

Creates a LineRenderSettings struct from the visualization attributes of the given CSO.

◆ getLineRenderSettingsOnSlice()

SoCSOEditorTools::LineRenderSettings SoCSOEditorExtension::getLineRenderSettingsOnSlice ( )
protected

Creates a LineRenderSettings struct from the editors visualization settings "onSlice" section.

◆ getPreviousSeedPoint()

ml::CSOSeedPoint * SoCSOEditorExtension::getPreviousSeedPoint ( ml::CSOSeedPoint * seedPoint) const

Returns the previous seed point of the given seed point for setting it as the next selected seed point.

◆ getSubType()

virtual SbString SoCSOEditorExtension::getSubType ( ) const
inlinevirtual

Returns the sub type string of the derived class.

Definition at line 142 of file SoCSOEditorExtension.h.

◆ getTransformedPosition()

ml::Vector3 SoCSOEditorExtension::getTransformedPosition ( const CSODrawView2DInfos & view2DInfos,
const ml::Vector3 & position )
protected

If a SoCSOTransform exists, this method returns the transformed position.

Returns the identity of the position otherwise.

◆ getVisualizationSettings()

ml::CSOVisualizationSettings * SoCSOEditorExtension::getVisualizationSettings ( )

Returns a pointer to the visual settings that are either the default ones or the ones set to the extensible editor (if present).

◆ glSetAlpha()

void SoCSOEditorExtension::glSetAlpha ( float alpha)
protected

Sets an alpha value but retains the set color.

◆ hasSelectedCSO()

bool SoCSOEditorExtension::hasSelectedCSO ( ) const
inline

Definition at line 139 of file SoCSOEditorExtension.h.

◆ hasSelectedSeedPoint()

bool SoCSOEditorExtension::hasSelectedSeedPoint ( ) const
inline

Definition at line 138 of file SoCSOEditorExtension.h.

◆ initClass()

static void SoCSOEditorExtension::initClass ( )
static

init class in inventor runtime

◆ initMembers()

◆ insertSeedPointDragMoveTo()

virtual void SoCSOEditorExtension::insertSeedPointDragMoveTo ( const SoPointerPosition & )
inlinevirtual

◆ insertSeedPointEndPress()

virtual SoPointingAction * SoCSOEditorExtension::insertSeedPointEndPress ( int )
inlinevirtual

◆ insertSeedPointStartPressAt()

virtual void SoCSOEditorExtension::insertSeedPointStartPressAt ( const SoPointerPosition & )
inlinevirtual

◆ isCreationAllowed()

virtual bool SoCSOEditorExtension::isCreationAllowed ( ) const
inlinevirtual

Returns whether the editor is allowed to create a new CSO.

Reimplemented in SoCSOModifyEditor.

Definition at line 115 of file SoCSOEditorExtension.h.

◆ isCreationAllowedAt()

virtual bool SoCSOEditorExtension::isCreationAllowedAt ( const SoPointerPosition & ) const
inlinevirtual

Returns whether the editor is allowed to create a new CSO at the given position, by default calls the previous method.

Reimplemented in SoCSOPointEditor.

Definition at line 117 of file SoCSOEditorExtension.h.

◆ isCSOVisible()

bool SoCSOEditorExtension::isCSOVisible ( const CSODrawCSOInfos & csoInfos,
const CSODrawView2DInfos & view2DInfos,
const CSODrawSliceInformation & drawSliceInfo,
SoView2DCSOExtensibleEditor * editor )
protected

Returns whether the CSO is visible on the current slice.

◆ isDefaultRenderer()

virtual bool SoCSOEditorExtension::isDefaultRenderer ( ) const
inlinevirtual

Returns whether the editor is the default editor.

Reimplemented in SoCSODefaultRenderer.

Definition at line 149 of file SoCSOEditorExtension.h.

◆ isModificationAllowed()

virtual bool SoCSOEditorExtension::isModificationAllowed ( ) const
inlinevirtual

Returns whether the editor is allowed to modify an existing CSO.

Definition at line 119 of file SoCSOEditorExtension.h.

◆ isModificationEditor()

virtual bool SoCSOEditorExtension::isModificationEditor ( ) const
inlinevirtual

Returns whether the editor is a modification editor.

Reimplemented in SoCSOBulgeEditor, SoCSOLabelRenderer, SoCSOModifyEditor, and SoCSOTransformEditor.

Definition at line 151 of file SoCSOEditorExtension.h.

◆ mapDeviceToWorld()

ml::Vector3 SoCSOEditorExtension::mapDeviceToWorld ( const SoPointerPosition & pos,
float deviceX,
float deviceY )
protected

Returns world coordinates for given device position.

◆ mapVoxelToWorld()

ml::Vector3 SoCSOEditorExtension::mapVoxelToWorld ( const SoPointerPosition & pos,
const ml::Vector3 & voxelPosition )
protected

Returns a world position for a given voxel position.

◆ mapWorldToDevice() [1/2]

void SoCSOEditorExtension::mapWorldToDevice ( const SoPointerPosition & pos,
const ml::Vector3 & worldPosition,
float & deviceX,
float & deviceY )
protected

Returns device coordinates for a given world position.

◆ mapWorldToDevice() [2/2]

void SoCSOEditorExtension::mapWorldToDevice ( View2DSliceList * slicelist,
const ml::Vector3 & worldPosition,
float & deviceX,
float & deviceY )
protected

Returns device coordinates for a given world position.

◆ mapWorldToVoxel() [1/2]

ml::Vector3 SoCSOEditorExtension::mapWorldToVoxel ( const SoPointerPosition & pos,
const ml::Vector3 & worldPosition )
protected

Returns a voxel position for a given world position.

◆ mapWorldToVoxel() [2/2]

ml::Vector3 SoCSOEditorExtension::mapWorldToVoxel ( const SoPointerPosition & pos,
const SbVec3f & worldPosition )
protected

Returns a voxel position for a given world position.

◆ mouseWheelEventReceived()

virtual void SoCSOEditorExtension::mouseWheelEventReceived ( SoMouseWheelEvent::Orientation ,
int ,
View2DEvent *  )
inlinevirtual

Method is called when the extensible editor received a mouse wheel event.

The orientation can be VERTICAL or HORIZONTAL, the turn encodes how much the wheel has been turned and by its sign, in which direction, and the View2DEvent contains the modifier keys that were pressed while interacting.

Definition at line 189 of file SoCSOEditorExtension.h.

◆ nonShadowOffset()

SbVec2f SoCSOEditorExtension::nonShadowOffset ( ) const
inlineprotected

Returns the default offset for non-shadows in pixels.

Definition at line 308 of file SoCSOEditorExtension.h.

References mlrange_cast().

◆ pointerLeftWindow()

virtual void SoCSOEditorExtension::pointerLeftWindow ( )
inlinevirtual

Is called when mouse pointer leaves the window.

Reimplemented in SoCSOLabelRenderer.

Definition at line 112 of file SoCSOEditorExtension.h.

◆ pointerPosition()

virtual void SoCSOEditorExtension::pointerPosition ( const SoPointerPosition & )
inlinevirtual

Is called when the mouse moves over a viewer.

Reimplemented in SoCSOBulgeEditor, SoCSOLiveWireEditor, and SoCSOLabelRenderer.

Definition at line 110 of file SoCSOEditorExtension.h.

◆ pointerPositionIfAllowedAt()

virtual void SoCSOEditorExtension::pointerPositionIfAllowedAt ( const SoPointerPosition & pos)
pure virtual

◆ renderPathPoints()

void SoCSOEditorExtension::renderPathPoints ( const CSOPathPointsRenderSettings & renderSettings,
const CSODrawCSOInfos & csoInfos,
const CSODrawView2DInfos & view2DInfos,
const std::vector< CSOSliceCrossing > & pathPointsLists,
GLint lineMode,
const SbVec2f & shadowOffsetDevice )
protected

Draws path points with given render settings.

◆ reset()

void SoCSOEditorExtension::reset ( )
inline

Definition at line 198 of file SoCSOEditorExtension.h.

◆ resetCache()

virtual void SoCSOEditorExtension::resetCache ( )
inlinevirtual

Resets internal module caches, if there are any.

Reimplemented in SoCSOLabelRenderer.

Definition at line 153 of file SoCSOEditorExtension.h.

◆ selectAndMoveDragMoveTo()

◆ selectAndMoveEndPress()

◆ selectAndMoveStartPressAt()

◆ sendCSOEventsOnCancel() [1/2]

void SoCSOEditorExtension::sendCSOEventsOnCancel ( ml::CSO * cso)

Sends CSO events for completing a creation or interaction when canceling it.

◆ sendCSOEventsOnCancel() [2/2]

virtual void SoCSOEditorExtension::sendCSOEventsOnCancel ( ml::CSOList * csoList)
virtual

◆ sendCSONotificationFinishInteraction()

void SoCSOEditorExtension::sendCSONotificationFinishInteraction ( )
protected

Sends a CSO notification on finishing an interaction with a CSO.

◆ sendCSONotificationInsertSeedPoint()

void SoCSOEditorExtension::sendCSONotificationInsertSeedPoint ( )
protected

Sends a CSO notification on inserting a seed point.

◆ sendCSONotificationMove()

void SoCSOEditorExtension::sendCSONotificationMove ( )
protected

Sends a CSO notification on moving a CSO or seed point.

◆ sendCSONotificationNewCSOStarted()

void SoCSOEditorExtension::sendCSONotificationNewCSOStarted ( )
protected

Sends a CSO notification on having started to create a new CSO.

◆ sendCSONotificationRepaint()

void SoCSOEditorExtension::sendCSONotificationRepaint ( )
protected

Sends a CSO notification to repaint the CSOList.

◆ sendCSONotificationResetInteractionState()

void SoCSOEditorExtension::sendCSONotificationResetInteractionState ( )
protected

Sends a CSO notification on having the interaction state being reset.

◆ setActiveCSOList()

void SoCSOEditorExtension::setActiveCSOList ( ml::CSOList * hitCSOList)

◆ setCreationData()

virtual void SoCSOEditorExtension::setCreationData ( const SoPointerPosition & pos,
ml::CSO * newCSO )
protectedvirtual

Sets creation data to a newly created CSO.

Reimplemented in SoCSOCreatorEditorExtension.

◆ setCSOUnderMouse()

void SoCSOEditorExtension::setCSOUnderMouse ( ml::CSO * cso)

◆ setExtensibleEditor()

void SoCSOEditorExtension::setExtensibleEditor ( SoView2DCSOExtensibleEditor * extensibleEditor)
inline

Sets the pointer to the calling extensible editor.

Definition at line 51 of file SoCSOEditorExtension.h.

References mlrange_cast().

◆ setExtensionIdAsSubType()

void SoCSOEditorExtension::setExtensionIdAsSubType ( )
inlineprotected

Sets the subtype member to the value of the extension id string.

The subtype member is stored in a created CSO and is used to identify the editor for a given CSO.

Definition at line 243 of file SoCSOEditorExtension.h.

◆ setSelectAndMoveInformation()

void SoCSOEditorExtension::setSelectAndMoveInformation ( ml::CSOList * hitCSOList,
ml::CSO * hitCSO,
ml::CSOSeedPoint * hitSeedPoint,
ml::CSOPathPoints * hitPathPoints,
float hitDistance )

◆ setupGLForCSO()

void SoCSOEditorExtension::setupGLForCSO ( const CSODrawCSOInfos & csoInfos)
protected

Sets up GL state for color, line width, and point size.

◆ setupGLShadow()

void SoCSOEditorExtension::setupGLShadow ( float generalAlpha = 1.0f)
protected

Sets up the GL state for shadow rendering (color and line width).

◆ setVisibleCSOs()

virtual void SoCSOEditorExtension::setVisibleCSOs ( const std::vector< CSODrawCSOInfos > & drawCSOInformation,
const CSODrawView2DInfos & view2DInfos,
SoView2DCSOExtensibleEditor * editor )
virtual

Sets visible CSOs that have been determined in the extensible editor.

Reimplemented in SoCSOAnnotationDeviceCoordinates, SoCSOBulgeEditor, and SoCSOLabelRenderer.

◆ shadowOffset()

SbVec2f SoCSOEditorExtension::shadowOffset ( ) const
inlineprotected

Returns the default offset for shadows in pixels.

Definition at line 310 of file SoCSOEditorExtension.h.

References mlrange_cast().

◆ shouldRenderCSOs()

virtual bool SoCSOEditorExtension::shouldRenderCSOs ( ) const
inlinevirtual

Returns whether the editor should render.

Definition at line 121 of file SoCSOEditorExtension.h.

◆ shouldRenderGeneral()

virtual bool SoCSOEditorExtension::shouldRenderGeneral ( ml::CSO * ) const
inlinevirtual

Returns whether a given CSO should be rendered by this general extension.

Overwrite this in general renderers.

Reimplemented in SoCSOAnnotationDeviceCoordinates, SoCSOBulgeEditor, SoCSOCrossSectionRenderer, SoCSOFillingRenderer, SoCSOImageStatistics, SoCSOLabelRenderer, SoCSOModifyEditor, and SoCSOTransformEditor.

Definition at line 147 of file SoCSOEditorExtension.h.

◆ shouldRenderSpecific()

virtual bool SoCSOEditorExtension::shouldRenderSpecific ( ml::CSO * cso) const
virtual

Returns whether a given CSO should be rendered by this specific extension.

Reimplemented in SoCSOAnnotationDeviceCoordinates, SoCSOBulgeEditor, SoCSOModifyEditor, and SoCSOTransformEditor.

◆ shouldShowCSOForCurrentTimePoint()

bool SoCSOEditorExtension::shouldShowCSOForCurrentTimePoint ( const CSODrawView2DInfos & view2DInfos,
ml::CSO * cso )

Returns whether the given CSO should be rendered for the current time point.

The decision depends on the visualization settings.

◆ startDrawing()

virtual void SoCSOEditorExtension::startDrawing ( View2DSliceList * )
inlinevirtual

Is called before drawing.

Reimplemented in SoCSOAnnotationDeviceCoordinates, and SoCSOLabelRenderer.

Definition at line 67 of file SoCSOEditorExtension.h.

Member Data Documentation

◆ _csoUnderMouse

ml::CSO* SoCSOEditorExtension::_csoUnderMouse
protected

Definition at line 225 of file SoCSOEditorExtension.h.

◆ _editor

SoView2DCSOExtensibleEditor* SoCSOEditorExtension::_editor
protected

Definition at line 217 of file SoCSOEditorExtension.h.

◆ _hitCSO

ml::CSO* SoCSOEditorExtension::_hitCSO
protected

Definition at line 221 of file SoCSOEditorExtension.h.

Referenced by SoCSOCreatorEditorExtension::getActiveCSO().

◆ _hitCSOList

ml::CSOListPtr SoCSOEditorExtension::_hitCSOList
protected

Pointer to internal/interactive states.

Definition at line 220 of file SoCSOEditorExtension.h.

◆ _hitDistance

float SoCSOEditorExtension::_hitDistance
protected

Definition at line 224 of file SoCSOEditorExtension.h.

◆ _hitPathPoints

ml::CSOPathPoints* SoCSOEditorExtension::_hitPathPoints
protected

Definition at line 223 of file SoCSOEditorExtension.h.

◆ _hitSeedPoint

ml::CSOSeedPoint* SoCSOEditorExtension::_hitSeedPoint
protected

Definition at line 222 of file SoCSOEditorExtension.h.

◆ _subType

SbString SoCSOEditorExtension::_subType
protected

Member for subtype of generated CSOs.

This subtype is set to a created CSO and is also used to decide whether an editor should handle the interaction with a CSO. If an editor should handle the interaction for all subtypes of CSOs, set the subtype of an editor to an empty string.

Definition at line 257 of file SoCSOEditorExtension.h.

◆ _visualizationSettings

ml::CSOVisualizationSettings SoCSOEditorExtension::_visualizationSettings
protected

Default visual settings. Access them via the method getVisualSettings().

Definition at line 251 of file SoCSOEditorExtension.h.

◆ allowCreation

SoSFBool SoCSOEditorExtension::allowCreation

Shall the editor allow creation?

Definition at line 168 of file SoCSOEditorExtension.h.

◆ allowModification

SoSFBool SoCSOEditorExtension::allowModification

Shall the editor allow modification of CSOs of its type?

Definition at line 170 of file SoCSOEditorExtension.h.

◆ allowSeedPointInteraction

SoSFBool SoCSOEditorExtension::allowSeedPointInteraction

Should the interaction with seed points be allowed?

Definition at line 172 of file SoCSOEditorExtension.h.

◆ csoIdUnderMouseCursor

SoSFInt32 SoCSOEditorExtension::csoIdUnderMouseCursor

The id of the CSO currently under the mouse (or -1 if no CSO is under the mouse).

Definition at line 183 of file SoCSOEditorExtension.h.

◆ extensionId

SoSFString SoCSOEditorExtension::extensionId

ID for a editor, needs to be unique per editor extension instance.

Definition at line 166 of file SoCSOEditorExtension.h.

◆ interactionForbiddenCursor

SoSFEnum SoCSOEditorExtension::interactionForbiddenCursor

Definition at line 180 of file SoCSOEditorExtension.h.

◆ inVisualizationSettings

SoSFMLBase SoCSOEditorExtension::inVisualizationSettings

Optionally attached visualization settings, overrides the vis.

settings from the extensible editor.

Definition at line 177 of file SoCSOEditorExtension.h.

◆ selectionCursor

SoSFEnum SoCSOEditorExtension::selectionCursor

Definition at line 179 of file SoCSOEditorExtension.h.

◆ shouldRender

SoSFBool SoCSOEditorExtension::shouldRender

Shall the editor render its CSOs?

Definition at line 174 of file SoCSOEditorExtension.h.


The documentation for this class was generated from the following file: