17#include <Inventor/fields/SoSFPlane.h>
18#include <Inventor/fields/SoSFFloat.h>
19#include <Inventor/fields/SoSFVec3f.h>
20#include <Inventor/fields/SoSFBool.h>
21#include <Inventor/fields/SoSFInt32.h>
22#include <Inventor/fields/SoSFMatrix.h>
126 enum HIT_MODE {NO_HIT, HIT_ROTATE, HIT_TRANSLATE, HIT_CENTER};
@ ARROW
Renders an arrow tip at the endpoint.
View2DEventPhase
event phase for simple extensions that grab the focus, do something (motion) and are released afterwa...
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
SoPointerPosition manages the current position of the mouse cursor.
SoPointingAction is the base class for any mouse based interaction.
SoView2DInteractionExtension is base class for all SoView2DExtensions that want to support the Manage...
SoSFFloat translationRangeMax
maximum value for plane parameter d
SoSFBool normalOn
draw normal
SoSFFloat centerGapSize
don't draw plane around rotationAxis (only if fixedLineWidth is set), gap size in pixels
SoSFBool fixedLineWidth
use translation range for plane parameter d
SoSFBool externalRotationAxisOn
set external rotation axis
void drawNormal(View2DSliceList *dsl, View2DSlice *dslice, SbVec2f p1, SbVec2f p2)
draw a normal on the slice
SoSFInt32 normalSize
size of normal to be drawn (in pixels)
bool clipToSliceRect(SbVec2f &p1, SbVec2f &p2, View2DSlice *dslice)
clip line to device rectangle of slice, returns false if nothing is left afterwards
SoSFEnum interactionMode
interaction mode plane can be rotated or translated or both
void draw(View2DSliceList *dsl, View2DSlice *dslice, int slice) override
reimplemented from SoView2DExtension
SoSFBool useTranslationRange
use translation range for plane parameter d
SoView2DPlane()
Constructor.
void dragMoveTo(const SoPointerPosition &pos) override
SoSFFloat translationLineFraction
Fraction of the visible line that is associated with translation (percent)
SoSFBool allowMoveExternalRotationAxis
allow to move the external rotation axis point with mouse
SoSFFloat translationRangeMin
minimum value for plane parameter d
SoSFBool useMouseCursors
use mouse cursors to indicate next interaction
SoSFVec3f externalRotationAxis
external rotation axis position
SoSFMatrix rotationDifference
Rotation between previous and current orientation.
bool isSensitiveAt(const SoPointerPosition &pos) override
static void initClass()
inventor runtime type system
bool evalEvent(SoView2D *view2d, View2DSliceList *slicelist, View2DEvent *ec, View2DEventPhase phase) override
reimplemented from SoView2DExtension
void dragMoveTo(const SbVec3f &point, View2DSliceList *slicelist)
implement dragging, parameter is world position
SoSFFloat blendMax
maximum blend value
SoSFBool useAntiAliasing
use anti-aliasing for rendering lines
HIT_MODE _hitPlane(const SbVec3f &point, View2DSliceList *dsl, int &proposedCursorShape)
is mouse cursor on plane?
SoSFBool maskValidAndHit
gives the state of the mask, which calculated by the current mousebuttons and modifier key compared t...
SoSFFloat normalOffset
offset of the normal from the plane
void startPressAt(const SoPointerPosition &pos) override
int getCurrentCursor(SoViewerProxy *viewerProxy) override
interface forwarded from SoPointingAction:
SoSFBool shadowOn
draw shadow
void clipLinePoint(float &p1x, float &p1y, float p2x, float p2y, float x0, float x1)
clip a line and a point in 2D, returns new point in p1x,p1y
void setExternalRotationAxis(SbVec3f rotPosition)
SoSFFloat blendMin
minimum blend value
HIT_MODE
describes if we hit the line and how
SoPointingAction * endPress(int clickCount) override
void drawPlaneLine(View2DSliceList *dsl, View2DSlice *dslice, SbVec2f p1, SbVec2f p2)
draw plane line, possibly including the normal indicator
SoSFEnum normalShape
shape of normal indicator
SoView2D is a 2D viewer for image data.
This class gives access to state of a viewer during scene graph traversal.
View2DEvent stores all information on an event on a SoView2D.
a list that holds all View2DSlice objects (lazily created) of a SoView2D
a single slice that is stored in a View2DSliceList, typically created by a View2DSliceList
Target mlrange_cast(Source arg)
Generic version of checked ML casts.