19#include <Inventor/fields/SoSFInt32.h>
21class SoView2DSlicerOffsetAction;
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
SoPointerPosition manages the current position of the mouse cursor.
SoView2DInteractionExtension(const std::string &actionID, bool positionSensitive=true)
bool evalEvent(SoView2D *view2d, View2DSliceList *slicelist, View2DEvent *ec, View2DEventPhase phase) override
reimplemented from SoView2DExtension
static bool modifyTimePoint(SoView2D *view2d, int offset)
void updateValues() override
setup code
SoView2DSlicerOffsetAction * _offsetAction
Additional offset action for changing start slice/time point.
bool modifyStartSlice(SoView2D *view2d, int offset)
Add offset to start slice/time point, returns true if the value was changed:
void editingOnChanged(SoField *field) override
called when editingOn field is touched:
float _sumY
current sum of y movement since last slice change
unsigned _prevWheelCode
previous wheel rotation orientation & sign code
static void initClass()
inventor runtime type system
void doSliceByMouse(float diffY, SoView2D *view2d)
SoSFInt32 stepSize
Increment slice by this many slices on each mouse wheel action.
void dragMoveTo(const SoPointerPosition &pos) override
float _oldY
previous y coordinate of mouse
SoSFBool permitInteractionOutsideImage
Field for toggling the interaction out of the image on/off.
int _sumWheel
current sum of 1/8 degrees of wheel rotation
void startPressAt(const SoPointerPosition &pos) override
virtual void sensitivityChanged(SoField *field)
called when sensitivity field is touched:
SoSFFloat sensitivity
sensitivity used for sliding
SoPointingAction * endPress(int clickCount) override
SoView2DSlicer()
Constructor.
SoView2D is a 2D viewer for image data.
View2DEvent stores all information on an event on a SoView2D.
a list that holds all View2DSlice objects (lazily created) of a SoView2D