3Depict
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
SelectionBinding Class Reference

This class is used to pool together a graphical representation (via the drawable), of. More...

#include <select.h>

Public Member Functions

 SelectionBinding ()
 
bool isActive (unsigned int button, unsigned int curModifierFlags)
 Returns true if this binding will be activated given the current flags. More...
 
void setBinding (unsigned int buttonFlags, unsigned int modifierFlags, unsigned int drawActionId, unsigned int bindingID, float initVal, DrawableObj *d)
 Set the binding for a float DO NOT CACHE THE DRAWABLEOBJ-> THAT IS BAD. More...
 
void setBinding (unsigned int buttonFlags, unsigned int modifierFlags, unsigned int drawActionId, unsigned int bindingID, const Point3D &initVal, DrawableObj *d)
 Set the binding for a Point3D. DO NOT CACHE THE DRAWABLEOBJ-> THAT IS BAD. More...
 
void setInteractionMode (unsigned int bindMode)
 Set the interaction method. (example translate, scale, rotate etc) More...
 
unsigned int getInteractionMode () const
 Get the interaction mode. More...
 
unsigned int getMouseButtons () const
 Get the mouse button. More...
 
unsigned int getKeyFlags () const
 Get the mouse button. More...
 
void setFloatLimits (float min, float max)
 Set the limits for a floating point data type. More...
 
bool matchesDrawable (const DrawableObj *d, unsigned int mouseFlags, unsigned int keyFlags) const
 Is this binding for the following object? More...
 
bool matchesDrawable (const DrawableObj *d) const
 Is this binding for the following object? More...
 
void applyTransform (const Point3D &worldVec, bool permanent=false)
 Apply the user ineraction specified. set permanent=true to. More...
 
void computeWorldVectorCoeffs (unsigned int buttonFlags, unsigned int modifierFlags, Point3D &xCoeffs, Point3D &yCoeffs) const
 Map the screen coords world coords, given the mouse and keyflags. More...
 
void getValue (float &f) const
 Retrieve the current value from the drawable representation. More...
 
void getValue (Point3D &p) const
 Retreive the current value from the drawable representation. More...
 
unsigned int getID () const
 
bool modified () const
 True if the binding has modified the data. More...
 
void resetModified ()
 

Detailed Description

This class is used to pool together a graphical representation (via the drawable), of.

Constructor & Destructor Documentation

◆ SelectionBinding()

SelectionBinding::SelectionBinding ( )

Member Function Documentation

◆ applyTransform()

void SelectionBinding::applyTransform ( const Point3D worldVec,
bool  permanent = false 
)

Apply the user ineraction specified. set permanent=true to.

References ASSERT, BIND_MODE_FLOAT_SCALE, BIND_MODE_FLOAT_TRANSLATE, BIND_MODE_POINT3D_ROTATE, BIND_MODE_POINT3D_ROTATE_LOCK, BIND_MODE_POINT3D_SCALE, BIND_MODE_POINT3D_TRANSLATE, and Point3D::sqrMag().

Referenced by getKeyFlags().

Here is the caller graph for this function:

◆ computeWorldVectorCoeffs()

void SelectionBinding::computeWorldVectorCoeffs ( unsigned int  buttonFlags,
unsigned int  modifierFlags,
Point3D xCoeffs,
Point3D yCoeffs 
) const

Map the screen coords world coords, given the mouse and keyflags.

References ASSERT, BIND_MODE_FLOAT_SCALE, BIND_MODE_FLOAT_TRANSLATE, BIND_MODE_POINT3D_ROTATE, BIND_MODE_POINT3D_ROTATE_LOCK, BIND_MODE_POINT3D_SCALE, BIND_MODE_POINT3D_TRANSLATE, FLAG_CMD, and FLAG_SHIFT.

Referenced by getKeyFlags().

Here is the caller graph for this function:

◆ getID()

unsigned int SelectionBinding::getID ( ) const
inline

◆ getInteractionMode()

unsigned int SelectionBinding::getInteractionMode ( ) const
inline

Get the interaction mode.

◆ getKeyFlags()

unsigned int SelectionBinding::getKeyFlags ( ) const
inline

Get the mouse button.

References applyTransform(), computeWorldVectorCoeffs(), getValue(), matchesDrawable(), and setFloatLimits().

Referenced by SelectionDevice::getBinding().

Here is the caller graph for this function:

◆ getMouseButtons()

unsigned int SelectionBinding::getMouseButtons ( ) const
inline

Get the mouse button.

◆ getValue() [1/2]

void SelectionBinding::getValue ( float &  f) const

◆ getValue() [2/2]

void SelectionBinding::getValue ( Point3D p) const

Retreive the current value from the drawable representation.

◆ isActive()

bool SelectionBinding::isActive ( unsigned int  button,
unsigned int  curModifierFlags 
)

Returns true if this binding will be activated given the current flags.

◆ matchesDrawable() [1/2]

bool SelectionBinding::matchesDrawable ( const DrawableObj d,
unsigned int  mouseFlags,
unsigned int  keyFlags 
) const

Is this binding for the following object?

Referenced by getKeyFlags().

Here is the caller graph for this function:

◆ matchesDrawable() [2/2]

bool SelectionBinding::matchesDrawable ( const DrawableObj d) const

Is this binding for the following object?

◆ modified()

bool SelectionBinding::modified ( ) const
inline

True if the binding has modified the data.

◆ resetModified()

void SelectionBinding::resetModified ( )
inline

◆ setBinding() [1/2]

void SelectionBinding::setBinding ( unsigned int  buttonFlags,
unsigned int  modifierFlags,
unsigned int  drawActionId,
unsigned int  bindingID,
float  initVal,
DrawableObj d 
)

Set the binding for a float DO NOT CACHE THE DRAWABLEOBJ-> THAT IS BAD.

References BIND_TYPE_FLOAT.

Referenced by TransformFilter::numBytesForCache(), IonClipFilter::refresh(), AnnotateFilter::refresh(), ProfileFilter::refresh(), and VoxeliseFilter::refresh().

Here is the caller graph for this function:

◆ setBinding() [2/2]

void SelectionBinding::setBinding ( unsigned int  buttonFlags,
unsigned int  modifierFlags,
unsigned int  drawActionId,
unsigned int  bindingID,
const Point3D initVal,
DrawableObj d 
)

Set the binding for a Point3D. DO NOT CACHE THE DRAWABLEOBJ-> THAT IS BAD.

References BIND_TYPE_POINT3D.

◆ setFloatLimits()

void SelectionBinding::setFloatLimits ( float  min,
float  max 
)

Set the limits for a floating point data type.

Referenced by getKeyFlags(), IonClipFilter::refresh(), AnnotateFilter::refresh(), ProfileFilter::refresh(), and VoxeliseFilter::refresh().

Here is the caller graph for this function:

◆ setInteractionMode()

void SelectionBinding::setInteractionMode ( unsigned int  bindMode)

Set the interaction method. (example translate, scale, rotate etc)

Referenced by TransformFilter::numBytesForCache(), IonClipFilter::refresh(), AnnotateFilter::refresh(), ProfileFilter::refresh(), and VoxeliseFilter::refresh().

Here is the caller graph for this function:

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