ROOT
6.06/09
Reference Guide
|
Scale manipulator - attaches to physical shape and draws local axes widgets with box heads.
User can mouse over (turns yellow) and L click/drag to scale along this axis.
Definition at line 30 of file TGLScaleManip.h.
Public Member Functions | |
TGLScaleManip () | |
TGLScaleManip (TGLPhysicalShape *shape) | |
Construct scale manipulator bound to TGLPhysicalShape 'shape'. More... | |
virtual | ~TGLScaleManip () |
Destroy the scale manipulator. More... | |
virtual void | Draw (const TGLCamera &camera) const |
Draw scale manipulator - tubes with box heads, in local axes of attached shape, in red(X), green(Y) and blue(Z), with white center sphere. More... | |
virtual Bool_t | HandleButton (const Event_t &event, const TGLCamera &camera) |
Handle mouse button event over manipulator - returns kTRUE if redraw required kFALSE otherwise. More... | |
virtual Bool_t | HandleMotion (const Event_t &event, const TGLCamera &camera) |
Handle mouse motion over manipulator - if active (selected widget) scale physical along selected widget (axis) of the manipulator, so it tracks mouse action. More... | |
Public Member Functions inherited from TGLManip | |
TGLManip () | |
Construct a manipulator object, bound to supplied viewer, and no physical shape. More... | |
TGLManip (TGLPhysicalShape *shape) | |
Construct a manipulator object, bound to supplied physical shape. More... | |
virtual | ~TGLManip () |
Destroy manipulator object. More... | |
UInt_t | GetSelectedWidget () const |
void | SetSelectedWidget (UInt_t s) |
Bool_t | GetActive () const |
void | SetActive (Bool_t a) |
void | Attach (TGLPhysicalShape *shape) |
TGLPhysicalShape * | GetAttached () const |
virtual Bool_t | Select (const TGLCamera &, const TGLRect &, const TGLBoundingBox &) |
ClassDef (TGLManip, 0) | |
Public Member Functions inherited from TVirtualGLManip | |
virtual | ~TVirtualGLManip () |
ClassDef (TVirtualGLManip, 0) | |
Private Member Functions | |
void | LimitScale (Double_t &factor) const |
initial scaling factors More... | |
Private Attributes | |
TGLVector3 | fStartScale |
Additional Inherited Members | |
Protected Member Functions inherited from TGLManip | |
TGLManip (const TGLManip &) | |
last (latest) mouse position (in WINDOW coords) More... | |
TGLManip & | operator= (const TGLManip &) |
Assignment operator. More... | |
void | CalcDrawScale (const TGLBoundingBox &box, const TGLCamera &camera, Double_t &base, TGLVector3 axis[3]) const |
Calculates base and axis scale factor (in world units) for drawing manipulators with reasonable size range in current camera. More... | |
const UChar_t * | ColorFor (UInt_t widget) const |
Returns color to be used for given widget. More... | |
Protected Attributes inherited from TGLManip | |
TGLPhysicalShape * | fShape |
UInt_t | fSelectedWidget |
manipulated shape More... | |
Bool_t | fActive |
active width (axis) component More... | |
TPoint | fFirstMouse |
manipulator is active? More... | |
TPoint | fLastMouse |
first (start) mouse position (in WINDOW coords) More... | |
#include <TGLScaleManip.h>
TGLScaleManip::TGLScaleManip | ( | ) |
TGLScaleManip::TGLScaleManip | ( | TGLPhysicalShape * | shape | ) |
Construct scale manipulator bound to TGLPhysicalShape 'shape'.
Definition at line 36 of file TGLScaleManip.cxx.
|
virtual |
Destroy the scale manipulator.
Definition at line 44 of file TGLScaleManip.cxx.
Draw scale manipulator - tubes with box heads, in local axes of attached shape, in red(X), green(Y) and blue(Z), with white center sphere.
If selected widget (mouse over) this is drawn in active colour (yellow).
Implements TGLManip.
Definition at line 53 of file TGLScaleManip.cxx.
Handle mouse button event over manipulator - returns kTRUE if redraw required kFALSE otherwise.
Reimplemented from TGLManip.
Definition at line 113 of file TGLScaleManip.cxx.
Handle mouse motion over manipulator - if active (selected widget) scale physical along selected widget (axis) of the manipulator, so it tracks mouse action.
Returns kTRUE if redraw required kFALSE otherwise.
Reimplemented from TGLManip.
Definition at line 129 of file TGLScaleManip.cxx.
initial scaling factors
Clamp scale to sizable values: 1000 - 1/1000 Guards against div by zero problems.
Definition at line 162 of file TGLScaleManip.cxx.
Referenced by HandleMotion().
|
private |
Definition at line 33 of file TGLScaleManip.h.
Referenced by HandleButton(), and HandleMotion().