MeVisLabToolboxReference
SoView2DRectangle Class Reference

allows drawing and editing of a rectangle on a SoView2D More...

#include <SoView2DRectangle.h>

Inheritance diagram for SoView2DRectangle:
SoView2DInteractionExtension SoView2DExtension

List of all members.

Public Member Functions

 SoView2DRectangle ()
 Constructor.
void draw (View2DSliceList *dsl, View2DSlice *dslice, int slice)
 reimplemented from SoView2DExtension
bool evalEvent (SoView2D *view2d, View2DSliceList *slicelist, View2DEvent *ec, View2DEventPhase phase)
 reimplemented from SoView2DExtension
bool ignoreEvent (View2DEvent *ec)
 Overwrite ignoreEvent -> ignore the "ignoreHandledEvents"-Field.

Static Public Member Functions

static void initClass ()
 inventor runtime type system

Public Attributes

SoSFVec3f startWorldPos
 start world position of rectangle
SoSFVec3f endWorldPos
 end world position of rectangle
SoSFFloat blendInside
 blend factor inside of rectangle
SoSFFloat blendOnto
 blend factor on border of rectangle
SoSFFloat blendOutside
 blend factor outside of rectangle
SoSFFloat lineBlendInside
 line blend factor when inside of rectangle
SoSFFloat lineBlendOnto
 line blend factor when on border of rectangle
SoSFFloat lineBlendOutside
 line blend factor when outside of rectangle
SoSFBool resetToImage
 reset to 80 percent of the original image
SoSFBool selectOutside
 allow selection outside of rectangle
SoSFBool allowDrag
 allow dragging of the rectangle
SoSFBool cooperative
 enable cooperative mode
SoSFFloat shadeExterior
 shade the exterior of the rectangle

Protected Types

enum  DragMode { DragNothing, DragAnyPoint, DragRect, DragCreateRect }
 type for specifying dragging mode More...

Protected Member Functions

DragMode performHitTest (int dx1, int dy1, const SbVec3f &voxelPos, View2DSliceList *slicelist)
 perform hit test where the rectangle is hit, returns false if the rectangle wasn't hit at all
void performDrag (const SbVec3f &voxelPos, bool setStart, View2DSliceList *slicelist)
 perform drag operation (this uses members set by performHitTest)
virtual bool isSensitiveAt (const SoPointerPosition &pos)
 interface forwarded from SoPointingAction:
virtual void startPressAt (const SoPointerPosition &pos)
virtual void dragMoveTo (const SoPointerPosition &pos)
virtual SoPointingAction * endPress (int clickCount)

Protected Attributes

DragMode _dragMode
 specify drag mode
SbVec3f _lastWorldPos
 last world position
bool _draggingInCooperativeMode
 to remember in cooperative mode, if the rectangle is currently selected and edited
bool _xhigher
 flags for DragAnyPoint mode
bool _yhigher
 internal flag
bool _dragx
 flag if x is dragged
bool _dragy
 flag if y is dragged

Detailed Description

allows drawing and editing of a rectangle on a SoView2D

Definition at line 24 of file SoView2DRectangle.h.


Member Enumeration Documentation

enum SoView2DRectangle::DragMode [protected]

type for specifying dragging mode

Enumerator:
DragNothing 
DragAnyPoint 
DragRect 
DragCreateRect 

Definition at line 84 of file SoView2DRectangle.h.


Constructor & Destructor Documentation

SoView2DRectangle::SoView2DRectangle ( )

Constructor.


Member Function Documentation

virtual void SoView2DRectangle::dragMoveTo ( const SoPointerPosition &  pos) [protected, virtual]

Reimplemented from SoView2DInteractionExtension.

void SoView2DRectangle::draw ( View2DSliceList dsl,
View2DSlice dslice,
int  slice 
) [virtual]

reimplemented from SoView2DExtension

Reimplemented from SoView2DExtension.

virtual SoPointingAction* SoView2DRectangle::endPress ( int  clickCount) [protected, virtual]

Reimplemented from SoView2DInteractionExtension.

bool SoView2DRectangle::evalEvent ( SoView2D view2d,
View2DSliceList slicelist,
View2DEvent ec,
View2DEventPhase  phase 
) [virtual]

reimplemented from SoView2DExtension

Reimplemented from SoView2DExtension.

bool SoView2DRectangle::ignoreEvent ( View2DEvent ec) [virtual]

Overwrite ignoreEvent -> ignore the "ignoreHandledEvents"-Field.

Reimplemented from SoView2DExtension.

static void SoView2DRectangle::initClass ( ) [static]

inventor runtime type system

Reimplemented from SoView2DInteractionExtension.

virtual bool SoView2DRectangle::isSensitiveAt ( const SoPointerPosition &  pos) [protected, virtual]

interface forwarded from SoPointingAction:

Reimplemented from SoView2DInteractionExtension.

void SoView2DRectangle::performDrag ( const SbVec3f &  voxelPos,
bool  setStart,
View2DSliceList slicelist 
) [protected]

perform drag operation (this uses members set by performHitTest)

DragMode SoView2DRectangle::performHitTest ( int  dx1,
int  dy1,
const SbVec3f &  voxelPos,
View2DSliceList slicelist 
) [protected]

perform hit test where the rectangle is hit, returns false if the rectangle wasn't hit at all

virtual void SoView2DRectangle::startPressAt ( const SoPointerPosition &  pos) [protected, virtual]

Reimplemented from SoView2DInteractionExtension.


Member Data Documentation

to remember in cooperative mode, if the rectangle is currently selected and edited

Definition at line 121 of file SoView2DRectangle.h.

specify drag mode

Definition at line 102 of file SoView2DRectangle.h.

bool SoView2DRectangle::_dragx [protected]

flag if x is dragged

Definition at line 112 of file SoView2DRectangle.h.

bool SoView2DRectangle::_dragy [protected]

flag if y is dragged

Definition at line 114 of file SoView2DRectangle.h.

SbVec3f SoView2DRectangle::_lastWorldPos [protected]

last world position

Definition at line 118 of file SoView2DRectangle.h.

bool SoView2DRectangle::_xhigher [protected]

flags for DragAnyPoint mode

internal flag

Definition at line 107 of file SoView2DRectangle.h.

bool SoView2DRectangle::_yhigher [protected]

internal flag

Definition at line 109 of file SoView2DRectangle.h.

allow dragging of the rectangle

Definition at line 57 of file SoView2DRectangle.h.

blend factor inside of rectangle

Definition at line 38 of file SoView2DRectangle.h.

blend factor on border of rectangle

Definition at line 40 of file SoView2DRectangle.h.

blend factor outside of rectangle

Definition at line 42 of file SoView2DRectangle.h.

enable cooperative mode

Definition at line 60 of file SoView2DRectangle.h.

end world position of rectangle

Definition at line 35 of file SoView2DRectangle.h.

line blend factor when inside of rectangle

Definition at line 44 of file SoView2DRectangle.h.

line blend factor when on border of rectangle

Definition at line 46 of file SoView2DRectangle.h.

line blend factor when outside of rectangle

Definition at line 48 of file SoView2DRectangle.h.

reset to 80 percent of the original image

Definition at line 51 of file SoView2DRectangle.h.

allow selection outside of rectangle

Definition at line 54 of file SoView2DRectangle.h.

shade the exterior of the rectangle

Definition at line 63 of file SoView2DRectangle.h.

start world position of rectangle

Definition at line 33 of file SoView2DRectangle.h.


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