SketcherGui::EditModeCoinManager Class Reference

Helper class for managing the Coin nodes of ViewProviderSketch. More...

#include <EditModeCoinManager.h>


struct  PreselectionResult
 This struct defines the information provided to other classes about preselection. More...

Public Member Functions

 EditModeCoinManager (ViewProviderSketch &vp)
 ~EditModeCoinManager ()
Temporary edit curves and markers
void drawEditMarkers (const std::vector< Base::Vector2d > &EditMarkers, unsigned int augmentationlevel)
void drawEdit (const std::vector< Base::Vector2d > &EditCurve)
void drawEdit (const std::list< std::vector< Base::Vector2d > > &list)
void setPositionText (const Base::Vector2d &Pos, const SbString &txt)
void setPositionText (const Base::Vector2d &Pos)
void resetPositionText (void)
void setAxisPickStyle (bool on)
handle preselection and selection of points
PreselectionResult detectPreselection (SoPickedPoint *Point, const SbVec2s &cursorPos)
SoGroupgetSelectedConstraints ()
 The client is responsible for unref-ing the SoGroup to release the memory. More...
update coin nodes
void processGeometryConstraintsInformationOverlay (const GeoListFacade &geolistfacade, bool rebuildinformationlayer)
void updateVirtualSpace ()
void drawConstraintIcons ()
 Draw all constraint icons. More...
void drawConstraintIcons (const GeoListFacade &geolistfacade)
coin node access
SoSeparatorgetRootEditNode ()
update coin colors
void updateColor ()
void updateColor (const GeoListFacade &geolistfacade)
change coin visualisation and behaviour
void updateGridExtent ()

change constraints selectability

void setConstraintSelectability (bool enabled=true)

Detailed Description

Helper class for managing the Coin nodes of ViewProviderSketch.

Given the substantial amount of code involved in coin node management, EditModeCoinManager further delegates on other specialised helper classes. Some of them share the ViewProviderSketchCoinAttorney, which defines the maximum coupling and minimum encapsulation.

The most important such delegates are: EditModeGeometryCoinManager and EditModeConstraintCoinManager.

EditModeCoinManager takes over the responsibility of creating the Coin (Inventor) scenograph and modifying it, including all the drawing of geometry, constraints and overlay layer. This is an exclusive responsibility under the Single Responsibility Principle.

EditModeCoinManager exposes a public interface to be used by ViewProviderSketch. Where, EditModeCoinManager needs special access to facilities of ViewProviderSketch in order to fulfil its responsibility, this access is defined by ViewProviderSketchCoinAttorney.

EditModeCoinManager is responsible, under the Single Responsibility Principle, to manage the coin EditRoot node. This node is ref-ed on creation and unref-ed on destruction to ensure that its lifetime matches the one of EditModecoinManager.

EditRoot is added on request to pcRoot by ViewProviderSketch. The node pcRoot belongs, under the Single Responsibility Principle, to ViewProviderSketch. EditModeCoinManager delegates addition and removal of child notes of EditRoot to specialised helper classes.

EditModeCoinManager is designed to define the span of time in which ViewProviderSketch is in edit mode.

In addition to the scenograph, EditModeCoinManager is responsible for keeping any necessary mapping between indices used at ViewProviderSketch level, and internal indexing used by EditModeCoinManager and its subclasses.

Constructor & Destructor Documentation

◆ EditModeCoinManager()

EditModeCoinManager::EditModeCoinManager ( ViewProviderSketch vp)

◆ ~EditModeCoinManager()

EditModeCoinManager::~EditModeCoinManager ( )

Member Function Documentation

◆ detectPreselection()

◆ drawConstraintIcons() [1/2]

void EditModeCoinManager::drawConstraintIcons ( )

Draw all constraint icons.

Except maybe the radius and lock ones?

◆ drawConstraintIcons() [2/2]

void EditModeCoinManager::drawConstraintIcons ( const GeoListFacade geolistfacade)

◆ drawEdit() [1/2]

◆ drawEdit() [2/2]

◆ drawEditMarkers()

◆ getRootEditNode()

SoSeparator * EditModeCoinManager::getRootEditNode ( )

◆ getSelectedConstraints()

SoGroup * EditModeCoinManager::getSelectedConstraints ( )

The client is responsible for unref-ing the SoGroup to release the memory.

References SketcherGui::EditModeScenegraphNodes::constrGroup.

◆ processGeometryConstraintsInformationOverlay()

void EditModeCoinManager::processGeometryConstraintsInformationOverlay ( const GeoListFacade geolistfacade,
bool  rebuildinformationlayer 

◆ resetPositionText()

void EditModeCoinManager::resetPositionText ( void  )

◆ setAxisPickStyle()

void EditModeCoinManager::setAxisPickStyle ( bool  on)

◆ setConstraintSelectability()

void EditModeCoinManager::setConstraintSelectability ( bool  enabled = true)

◆ setPositionText() [1/2]

void EditModeCoinManager::setPositionText ( const Base::Vector2d Pos)

◆ setPositionText() [2/2]

void EditModeCoinManager::setPositionText ( const Base::Vector2d Pos,
const SbString &  txt 

◆ updateColor() [1/2]

void EditModeCoinManager::updateColor ( )

References updateColor().

Referenced by updateColor().

◆ updateColor() [2/2]

void EditModeCoinManager::updateColor ( const GeoListFacade geolistfacade)

◆ updateGridExtent()

void EditModeCoinManager::updateGridExtent ( )

◆ updateVirtualSpace()

void EditModeCoinManager::updateVirtualSpace ( )

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