15#include "TGLIncludes.h"
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;
Concrete class describing an orientated (free) or axis aligned box of 8 vertices.
TGLVertex3 Center() const
const TGLVector3 & Axis(UInt_t i, Bool_t normalised=kTRUE) const
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
TGLVector3 ViewportDeltaToWorld(const TGLVertex3 &worldRef, Double_t viewportXDelta, Double_t viewportYDelta, TGLMatrix *modviewMat=nullptr) const
Apply a 2D viewport delta (shift) to the projection of worldRef onto viewport, returning the resultan...
Abstract base class for viewer manipulators, which allow direct in viewer manipulation of a (TGlPhysi...
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.
TPoint fFirstMouse
manipulator is active?
virtual Bool_t HandleButton(const Event_t &event, const TGLCamera &camera)
Handle a mouse button event - return kTRUE if processed, kFALSE otherwise.
Bool_t fActive
active width (axis) component
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 ...
UInt_t fSelectedWidget
manipulated shape
TGLPhysicalShape * fShape
Concrete physical shape - a GL drawable.
void Scale(const TGLVector3 &scale)
const TGLBoundingBox & BoundingBox() const
TGLVector3 GetScale() const
Scale manipulator - attaches to physical shape and draws local axes widgets with box heads.
virtual Bool_t HandleButton(const Event_t &event, const TGLCamera &camera)
Handle mouse button event over manipulator - returns kTRUE if redraw required kFALSE otherwise.
void LimitScale(Double_t &factor) const
initial scaling factors
virtual void Draw(const TGLCamera &camera) const
Draw scale manipulator - tubes with box heads, in local axes of attached shape, in red(X),...
TGLScaleManip()
Construct scale manipulator not bound to any physical shape.
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...
virtual ~TGLScaleManip()
Destroy the scale manipulator.
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'.
static const UChar_t fgWhite[4]
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,...
static const UChar_t fgGrey[4]
3 component (x/y/z) vector class.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)