69 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
70 glDisable(GL_CULL_FACE);
105 glEnable(GL_CULL_FACE);
143 Double_t factor = -5.0*
Dot(shift, widgetAxis) / screenScale.
Mag();
146 newScale[axisIndex] += factor;
Abstract base class for viewer manipulators, which allow direct in viewer manipulation of a (TGlPhysi...
TGLVertex3 Center() const
virtual Bool_t HandleButton(const Event_t &event, const TGLCamera &camera)
Handle mouse button event over manipulator - returns kTRUE if redraw required kFALSE otherwise...
TGLScaleManip()
Construct scale manipulator not bound to any physical shape.
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
virtual Bool_t HandleMotion(const Event_t &event, const TGLCamera &camera)
Handle mouse motion over manipulator - if active (selected widget) scale physical along selected widg...
static void DrawLine(const TGLLine3 &line, ELineHeadShape head, Double_t size, const UChar_t rgba[4])
Draw thick line (tube) defined by 'line', with head at end shape 'head' - box/arrow/none, (head) size 'size', color 'rgba'.
virtual Bool_t HandleButton(const Event_t &event, const TGLCamera &camera)
Handle a mouse button event - return kTRUE if processed, kFALSE otherwise.
static const UChar_t fgGrey[4]
UInt_t fSelectedWidget
manipulated shape
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
virtual void Draw(const TGLCamera &camera) const
Draw scale manipulator - tubes with box heads, in local axes of attached shape, in red(X)...
Scale manipulator - attaches to physical shape and draws local axes widgets with box heads...
Concrete physical shape - a GL drawable.
static void DrawSphere(const TGLVertex3 &position, Double_t radius, const UChar_t rgba[4])
Draw sphere, centered on vertex 'position', with radius 'radius', color 'rgba'.
const TGLBoundingBox & BoundingBox() const
TGLVector3 GetScale() const
3 component (x/y/z) vector class.
TPoint fLastMouse
first (start) mouse position (in WINDOW coords)
const UChar_t * ColorFor(UInt_t widget) const
Returns color to be used for given widget.
void LimitScale(Double_t &factor) const
initial scaling factors
TGLVector3 ViewportDeltaToWorld(const TGLVertex3 &worldRef, Double_t viewportXDelta, Double_t viewportYDelta, TGLMatrix *modviewMat=0) const
Apply a 2D viewport delta (shift) to the projection of worldRef onto viewport, returning the resultan...
Bool_t fActive
active width (axis) component
static const UChar_t fgWhite[4]
TGLPhysicalShape * fShape
void Scale(const TGLVector3 &scale)
Double_t Dot(const TGLVector3 &v1, const TGLVector3 &v2)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual ~TGLScaleManip()
Destroy the scale manipulator.
Concrete class describing an orientated (free) or axis aligned box of 8 vertices. ...
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 ...
const TGLVector3 & Axis(UInt_t i, Bool_t normalised=kTRUE) const
TPoint fFirstMouse
manipulator is active?