21#include <ThirdPartyWarningsDisable.h>
22#include <boost/unordered_set.hpp>
23#include <ThirdPartyWarningsRestore.h>
103 void getDeviceCoordinates(View2DSliceList* slicelist,
const ml::Vector3& position,
float& deviceX,
float& deviceY);
104 void getDeviceCoordinates(View2DSliceList* slicelist,
const SbVec3f& position,
float& deviceX,
float& deviceY);
106 void fillPositionsOnPath(View2DSliceList* slicelist);
107 void fillPositionsOnPath(View2DSliceList* slicelist, std::vector <PositionOnPath>& positions,
bool searchUpwards);
109 void draw(View2DSliceList* slicelist,
const std::vector <PositionOnPath> & positions,
float startX,
float startY);
111 float getSquaredDistance(
float x1,
float y1,
float x2,
float y2)
const;
113 void initializePositionsInteractive(
const std::vector <PositionOnPath> & positionsInitial, std::vector <PositionOnPath> & positionsInteractive);
115 void movePositions(
const std::vector <PositionOnPath> & source, std::vector <PositionOnPath> & destination,
const SbVec3f& moveDelta);
117 void fillBulgedClosedCSO();
118 void fillBulgedOpenCSO();
120 std::vector <PositionOnPath> _positionsUpInitial;
121 std::vector <PositionOnPath> _positionsDownInitial;
123 std::vector <PositionOnPath> _positionsUpInteractive;
124 std::vector <PositionOnPath> _positionsDownInteractive;
126 ml::CSOPathPointIterator _endUpIter;
127 ml::CSOPathPointIterator _endDownIter;
129 unsigned int _hitPathPointIndex;
130 bool _shouldShowInfluence;
131 SbVec3f _startPosition;
135 boost::unordered_set < int > _visibleCSOIds;
#define SOCSO_EXPORT
Header file for system independent resolution.
void bulgeStartPressAt(const SoPointerPosition &pos) override
SoSFColor previewColor
The preview color.
SoPointingAction * bulgeEndPress(int clickCount) override
void bulgeDragMoveTo(const SoPointerPosition &pos) override
void selectAndMoveStartPressAt(const SoPointerPosition &) override
SoSFFloat previewWidth
The preview width.
void setVisibleCSOs(const std::vector< CSODrawCSOInfos > &drawCSOInformation, const CSODrawView2DInfos &view2DInfos, SoView2DCSOExtensibleEditor *editor) override
Sets visible CSOs that have been determined in the extensible editor.
bool shouldRenderGeneral(ml::CSO *) const override
void pointerPositionIfAllowedAt(const SoPointerPosition &) override
SoSFEnum interactionPossibleCursor
static void initClass()
init class in inventor runtime
void selectAndMoveDragMoveTo(const SoPointerPosition &) override
SoSFInt32 pathInfluenceLength
The influence along the path in pixel.
void setBulgeInformation(ml::CSOList *csoList, ml::CSO *cso, ml::CSOPathPoints *pathPoints, unsigned int pathPointIndex, float distance)
bool isCSOWithIdVisible(int id)
bool createEndPress(int) override
SoPointingAction * selectAndMoveEndPress(int) override
SoCSOBulgeEditor()
Standard constructor.
void draw(const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const CSODrawSliceInformation &drawSliceInfo, SoView2DCSOExtensibleEditor *editor) override
Drawing routine.
void initMembers() override
void showInfluence(bool state)
bool shouldRenderSpecific(ml::CSO *) const override
Returns whether a given CSO should be rendered by this specific extension.
void createDragMoveTo(const SoPointerPosition &) override
SoSFEnum interactionPerformCursor
SoSFInt32 selectionDistance
The selection distance in pixel.
void cancel() override
Cancels an action like generating a CSO. Depends on concrete editor.
bool isModificationEditor() const override
Returns whether the editor is a modification editor.
void pointerPosition(const SoPointerPosition &) override
Called when the mouse moves over a viewer.
void createStartPressAt(const SoPointerPosition &) override
SoCSOEditorExtension()
Hidden constructor.
virtual void draw(const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const CSODrawSliceInformation &sliceInfo, SoView2DCSOExtensibleEditor *editor)
Main routine for drawing a CSO.
SoPointerPosition manages the current position of the mouse cursor.
Tvec3< MLdouble > Vector3
A vector with three components of type double.