MeVisLabToolboxReference
SoView2DPlane Class Reference

#include <SoView2DPlane.h>

Inheritance diagram for SoView2DPlane:
SoView2DInteractionExtension SoView2DExtension

List of all members.

Public Types

enum  InteractionMode { TRANSLATE, ROTATE, BOTH }
enum  NormalShape { TRIANGLE, ARROW }

Public Member Functions

 SoView2DPlane ()
 Constructor.
virtual void draw (View2DSliceList *dsl, View2DSlice *dslice, int slice)
 reimplemented from SoView2DExtension
bool evalEvent (SoView2D *view2d, View2DSliceList *slicelist, View2DEvent *ec, View2DEventPhase phase)
 reimplemented from SoView2DExtension
void setExternalRotationAxis (SbVec3f rotPosition)

Static Public Member Functions

static void initClass ()
 inventor runtime type system

Public Attributes

SoSFPlane plane
 plane to be drawn
SoSFEnum interactionMode
 interaction mode plane can be rotated or translated or both
SoSFBool maskValidAndHit
 gives the state of the mask, which calculated by the current mousebuttons and modifier key compared to the button1,button2,button3,ctrl,shift,alt settings.
SoSFFloat blendMin
 minimum blend value
SoSFFloat blendMax
 maximum blend value
SoSFBool normalOn
 draw normal
SoSFBool externalRotationAxisOn
 set external rotation axis
SoSFVec3f externalRotationAxis
 external rotation axis position
SoSFFloat centerGapSize
 don't draw plane around rotationAxis (only if fixedLineWidth is set), gap size in pixels
SoSFInt32 normalSize
 size of normal to be drawn (in pixels)
SoSFFloat normalOffset
 offset of the normal from the plane
SoSFEnum normalShape
 shape of normal indicator
SoSFMatrix rotationDifference
 Rotation between previous and current orientation.
SoSFFloat translationLineFraction
 Fraction of the visible line that is associated with translation (percent)
SoSFBool useTranslationRange
 use translation range for plane parameter d
SoSFFloat translationRangeMin
 minimum value for plane parameter d
SoSFFloat translationRangeMax
 maximum value for plane parameter d
SoSFBool fixedLineWidth
 use translation range for plane parameter d
SoSFBool useAntiAliasing
 use anti-aliasing for rendering lines
SoSFBool useMouseCursors
 use mouse cursors to indicate next interaction

Protected Types

enum  HIT_MODE { NO_HIT = 0, HIT_ROTATE = 1, HIT_TRANSLATE = 3 }
 describes if we hit the line and how More...

Protected Member Functions

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
bool clipToSliceRect (SbVec2f &p1, SbVec2f &p2, View2DSlice *dslice)
 clip line to device rectangle of slice, returns false if nothing is left afterwards
void drawPlaneLine (View2DSliceList *dsl, View2DSlice *dslice, SbVec2f p1, SbVec2f p2)
 draw plane line, possibly including the normal indicator
void drawNormal (View2DSliceList *dsl, View2DSlice *dslice, SbVec2f p1, SbVec2f p2)
 draw a normal on the slice
HIT_MODE _hitPlane (const SbVec3f &point, View2DSliceList *dsl, int &proposedCursorShape)
 is mouse cursor on plane?
void dragMoveTo (const SbVec3f &point, View2DSliceList *slicelist)
 implement dragging, parameter is world position
virtual int getCurrentCursor (SoViewerProxy *viewerProxy)
 interface forwarded from SoPointingAction:
virtual bool isSensitiveAt (const SoPointerPosition &pos)
virtual void startPressAt (const SoPointerPosition &pos)
virtual void dragMoveTo (const SoPointerPosition &pos)
virtual SoPointingAction * endPress (int clickCount)

Detailed Description

Definition at line 29 of file SoView2DPlane.h.


Member Enumeration Documentation

enum SoView2DPlane::HIT_MODE [protected]

describes if we hit the line and how

Enumerator:
NO_HIT 
HIT_ROTATE 
HIT_TRANSLATE 

Definition at line 125 of file SoView2DPlane.h.

Enumerator:
TRANSLATE 
ROTATE 
BOTH 

Definition at line 34 of file SoView2DPlane.h.

Enumerator:
TRIANGLE 
ARROW 

Definition at line 40 of file SoView2DPlane.h.


Constructor & Destructor Documentation

SoView2DPlane::SoView2DPlane ( )

Constructor.


Member Function Documentation

HIT_MODE SoView2DPlane::_hitPlane ( const SbVec3f &  point,
View2DSliceList dsl,
int &  proposedCursorShape 
) [protected]

is mouse cursor on plane?

void SoView2DPlane::clipLinePoint ( float &  p1x,
float &  p1y,
float  p2x,
float  p2y,
float  x0,
float  x1 
) [protected]

clip a line and a point in 2D, returns new point in p1x,p1y

bool SoView2DPlane::clipToSliceRect ( SbVec2f &  p1,
SbVec2f &  p2,
View2DSlice dslice 
) [protected]

clip line to device rectangle of slice, returns false if nothing is left afterwards

void SoView2DPlane::dragMoveTo ( const SbVec3f &  point,
View2DSliceList slicelist 
) [protected]

implement dragging, parameter is world position

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

Reimplemented from SoView2DInteractionExtension.

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

reimplemented from SoView2DExtension

Reimplemented from SoView2DExtension.

void SoView2DPlane::drawNormal ( View2DSliceList dsl,
View2DSlice dslice,
SbVec2f  p1,
SbVec2f  p2 
) [protected]

draw a normal on the slice

void SoView2DPlane::drawPlaneLine ( View2DSliceList dsl,
View2DSlice dslice,
SbVec2f  p1,
SbVec2f  p2 
) [protected]

draw plane line, possibly including the normal indicator

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

Reimplemented from SoView2DInteractionExtension.

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

reimplemented from SoView2DExtension

Reimplemented from SoView2DExtension.

virtual int SoView2DPlane::getCurrentCursor ( SoViewerProxy viewerProxy) [protected, virtual]

interface forwarded from SoPointingAction:

Reimplemented from SoView2DInteractionExtension.

static void SoView2DPlane::initClass ( ) [static]

inventor runtime type system

Reimplemented from SoView2DInteractionExtension.

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

Reimplemented from SoView2DInteractionExtension.

void SoView2DPlane::setExternalRotationAxis ( SbVec3f  rotPosition) [inline]

Definition at line 108 of file SoView2DPlane.h.

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

Reimplemented from SoView2DInteractionExtension.


Member Data Documentation

maximum blend value

Definition at line 62 of file SoView2DPlane.h.

minimum blend value

Definition at line 60 of file SoView2DPlane.h.

don't draw plane around rotationAxis (only if fixedLineWidth is set), gap size in pixels

Definition at line 70 of file SoView2DPlane.h.

external rotation axis position

Definition at line 68 of file SoView2DPlane.h.

set external rotation axis

Definition at line 66 of file SoView2DPlane.h.

use translation range for plane parameter d

Definition at line 88 of file SoView2DPlane.h.

interaction mode plane can be rotated or translated or both

Definition at line 53 of file SoView2DPlane.h.

gives the state of the mask, which calculated by the current mousebuttons and modifier key compared to the button1,button2,button3,ctrl,shift,alt settings.

Moreover the plane must be hit.

Definition at line 57 of file SoView2DPlane.h.

offset of the normal from the plane

Definition at line 74 of file SoView2DPlane.h.

draw normal

Definition at line 64 of file SoView2DPlane.h.

shape of normal indicator

Definition at line 76 of file SoView2DPlane.h.

size of normal to be drawn (in pixels)

Definition at line 72 of file SoView2DPlane.h.

plane to be drawn

Definition at line 48 of file SoView2DPlane.h.

Rotation between previous and current orientation.

Definition at line 78 of file SoView2DPlane.h.

Fraction of the visible line that is associated with translation (percent)

Definition at line 80 of file SoView2DPlane.h.

maximum value for plane parameter d

Definition at line 86 of file SoView2DPlane.h.

minimum value for plane parameter d

Definition at line 84 of file SoView2DPlane.h.

use anti-aliasing for rendering lines

Definition at line 90 of file SoView2DPlane.h.

use mouse cursors to indicate next interaction

Definition at line 92 of file SoView2DPlane.h.

use translation range for plane parameter d

Definition at line 82 of file SoView2DPlane.h.


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