3Depict
|
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 () |
This class is used to pool together a graphical representation (via the drawable), of.
SelectionBinding::SelectionBinding | ( | ) |
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().
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().
|
inline |
Referenced by IonClipFilter::setPropFromBinding(), TransformFilter::setPropFromBinding(), AnnotateFilter::setPropFromBinding(), ProfileFilter::setPropFromBinding(), VoxeliseFilter::setPropFromBinding(), and SpatialAnalysisFilter::setPropFromBinding().
|
inline |
Get the interaction mode.
|
inline |
Get the mouse button.
References applyTransform(), computeWorldVectorCoeffs(), getValue(), matchesDrawable(), and setFloatLimits().
Referenced by SelectionDevice::getBinding().
|
inline |
Get the mouse button.
void SelectionBinding::getValue | ( | float & | f | ) | const |
Retrieve the current value from the drawable representation.
Referenced by getKeyFlags(), IonClipFilter::setPropFromBinding(), TransformFilter::setPropFromBinding(), AnnotateFilter::setPropFromBinding(), ProfileFilter::setPropFromBinding(), VoxeliseFilter::setPropFromBinding(), and SpatialAnalysisFilter::setPropFromBinding().
void SelectionBinding::getValue | ( | Point3D & | p | ) | const |
Retreive the current value from the drawable representation.
bool SelectionBinding::isActive | ( | unsigned int | button, |
unsigned int | curModifierFlags | ||
) |
Returns true if this binding will be activated given the current flags.
bool SelectionBinding::matchesDrawable | ( | const DrawableObj * | d, |
unsigned int | mouseFlags, | ||
unsigned int | keyFlags | ||
) | const |
Is this binding for the following object?
Referenced by getKeyFlags().
bool SelectionBinding::matchesDrawable | ( | const DrawableObj * | d | ) | const |
Is this binding for the following object?
|
inline |
True if the binding has modified the data.
|
inline |
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().
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.
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().
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().