MeVisLab Toolbox Reference
SoCSOFillingRenderer Class Reference

Extension for rendering filled (tessellated) CSOs. More...

#include <SoCSOFillingRenderer.h>

Inheritance diagram for SoCSOFillingRenderer:
SoCSOGeneralRendererEditorExtension SoCSOEditorExtension

Public Member Functions

 SoCSOFillingRenderer ()
 Standard constructor.
 ~SoCSOFillingRenderer () override
 Destructor.
void draw (const CSODrawCSOInfos &csoDrawInfos, const CSODrawView2DInfos &view2DInfos, const std::vector< CSODrawSliceInformation > &sliceInfos, SoView2DCSOExtensibleEditor *editor) override
 General drawing routine.
void draw (const CSODrawCSOInfos &, const CSODrawView2DInfos &, const CSODrawSliceInformation &, SoView2DCSOExtensibleEditor *) override
 Common drawing routine, not used.
int cursorShape () const override
 Returns the cursor shape that indicates the next creation.
bool shouldRenderGeneral (ml::CSO *) const override
Public Member Functions inherited from SoCSOGeneralRendererEditorExtension
void createStartPressAt (const SoPointerPosition &) override
void createDragMoveTo (const SoPointerPosition &) override
bool createEndPress (int) override
void pointerPositionIfAllowedAt (const SoPointerPosition &) override
void selectAndMoveStartPressAt (const SoPointerPosition &) override
void selectAndMoveDragMoveTo (const SoPointerPosition &) override
SoPointingActionselectAndMoveEndPress (int) override
Public Member Functions inherited from SoCSOEditorExtension
void setExtensibleEditor (SoView2DCSOExtensibleEditor *extensibleEditor)
 Sets the pointer to the calling extensible editor.
virtual void activate (SoView2DCSOExtensibleEditor *extensibleEditor)
virtual void deactivate ()
virtual void buttonMaskChanged ()
virtual void editingOnChanged ()
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 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)
virtual void drawAdditionalGeometry (const CSODrawView2DInfos &view2DInfos, SoView2DCSOExtensibleEditor *editor)
 Routine for drawing additional geometry of the extension.
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 &)
 Called when the mouse moves over a viewer.
virtual void pointerLeftWindow ()
 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 ()
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 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 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
virtual void mouseWheelEventReceived (SoMouseWheelEvent::Orientation, int, View2DEvent *)
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)
void reset ()
ml::CSOVisualizationSettingsgetVisualizationSettings ()
bool shouldShowCSOForCurrentTimePoint (const CSODrawView2DInfos &view2DInfos, ml::CSO *cso)
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
Static Public Member Functions inherited from SoCSOGeneralRendererEditorExtension
static void initClass ()
 init class in inventor runtime
Static Public Member Functions inherited from SoCSOEditorExtension
static void initClass ()
 init class in inventor runtime

Public Attributes

SoSFTypedEnum< HoleCorrectionModeholeCorrectionMode
SoSFBool onlyFillSelectedCSOs
SoSFBool useCustomBlendFunction
SoSFTypedEnum< FillingBlendFuncsrcBlendFunction
SoSFTypedEnum< FillingBlendFuncdstBlendFunction
SoSFColor blendColor
SoSFFloat blendAlpha
Public Attributes inherited from SoCSOGeneralRendererEditorExtension
SoSFEnum colorMode
SoSFColor generalColor
SoSFFloat generalAlpha
Public Attributes inherited from SoCSOEditorExtension
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
SoSFEnum selectionCursor
SoSFEnum interactionForbiddenCursor
SoSFInt32 csoIdUnderMouseCursor
 The ID of the CSO currently under the mouse (or -1 if no CSO is under the mouse).

Additional Inherited Members

Protected Member Functions inherited from SoCSOGeneralRendererEditorExtension
 SoCSOGeneralRendererEditorExtension ()
 Hidden constructor.
bool shouldShowCSO (ml::CSO *cso, const CSODrawView2DInfos &view2DInfos, SoView2DCSOExtensibleEditor *editor)
void glSetColor (ml::CSO *cso)
Protected Member Functions inherited from SoCSOEditorExtension
 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 ()
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.
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 inherited from SoCSOEditorExtension
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

Detailed Description

Extension for rendering filled (tessellated) CSOs.

Definition at line 66 of file SoCSOFillingRenderer.h.

Constructor & Destructor Documentation

◆ SoCSOFillingRenderer()

SoCSOFillingRenderer::SoCSOFillingRenderer ( )

Standard constructor.

◆ ~SoCSOFillingRenderer()

SoCSOFillingRenderer::~SoCSOFillingRenderer ( )
override

Destructor.

Member Function Documentation

◆ cursorShape()

int SoCSOFillingRenderer::cursorShape ( ) const
inlineoverridevirtual

Returns the cursor shape that indicates the next creation.

Reimplemented from SoCSOEditorExtension.

Definition at line 86 of file SoCSOFillingRenderer.h.

References SoViewerProxy::DEFAULT_CURSOR.

◆ draw() [1/2]

void SoCSOFillingRenderer::draw ( const CSODrawCSOInfos & ,
const CSODrawView2DInfos & ,
const CSODrawSliceInformation & ,
SoView2DCSOExtensibleEditor *  )
inlineoverridevirtual

Common drawing routine, not used.

Reimplemented from SoCSOEditorExtension.

Definition at line 81 of file SoCSOFillingRenderer.h.

◆ draw() [2/2]

void SoCSOFillingRenderer::draw ( const CSODrawCSOInfos & csoDrawInfos,
const CSODrawView2DInfos & view2DInfos,
const std::vector< CSODrawSliceInformation > & sliceInfos,
SoView2DCSOExtensibleEditor * editor )
overridevirtual

General drawing routine.

Implements SoCSOGeneralRendererEditorExtension.

◆ initClass()

void SoCSOFillingRenderer::initClass ( )
static

init class in inventor runtime

◆ shouldRenderGeneral()

bool SoCSOFillingRenderer::shouldRenderGeneral ( ml::CSO * ) const
inlineoverridevirtual

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

Reimplemented from SoCSOEditorExtension.

Definition at line 88 of file SoCSOFillingRenderer.h.

Member Data Documentation

◆ blendAlpha

SoSFFloat SoCSOFillingRenderer::blendAlpha

Definition at line 97 of file SoCSOFillingRenderer.h.

◆ blendColor

SoSFColor SoCSOFillingRenderer::blendColor

Definition at line 96 of file SoCSOFillingRenderer.h.

◆ dstBlendFunction

SoSFTypedEnum<FillingBlendFunc> SoCSOFillingRenderer::dstBlendFunction

Definition at line 95 of file SoCSOFillingRenderer.h.

◆ holeCorrectionMode

SoSFTypedEnum<HoleCorrectionMode> SoCSOFillingRenderer::holeCorrectionMode

Definition at line 90 of file SoCSOFillingRenderer.h.

◆ onlyFillSelectedCSOs

SoSFBool SoCSOFillingRenderer::onlyFillSelectedCSOs

Definition at line 91 of file SoCSOFillingRenderer.h.

◆ srcBlendFunction

SoSFTypedEnum<FillingBlendFunc> SoCSOFillingRenderer::srcBlendFunction

Definition at line 94 of file SoCSOFillingRenderer.h.

◆ useCustomBlendFunction

SoSFBool SoCSOFillingRenderer::useCustomBlendFunction

Definition at line 93 of file SoCSOFillingRenderer.h.


The documentation for this class was generated from the following file:
  • MeVisLab/Standard/Sources/Inventor/SoCSO/SoView2DCSOEditor/SoView2DCSOExtensibleEditor/extensions/SoCSOFillingRenderer/SoCSOFillingRenderer.h