16#include "TGLIncludes.h"
38 fSelectedWidget(0), fActive(
kFALSE),
49 fSelectedWidget(0), fActive(
kFALSE),
61 fSelectedWidget(gm.fSelectedWidget),
63 fFirstMouse(gm.fFirstMouse),
64 fLastMouse(gm.fLastMouse)
74 TVirtualGLManip::operator=(gm);
159 base =
box.Extents().Mag() / 100.0;
165 if (base < pixelScale * 3.0) {
166 base = pixelScale * 3.0;
167 }
else if (base > pixelScale * 6.0) {
168 base = pixelScale * 6.0;
172 for (
UInt_t i = 0; i<3; i++) {
174 axis[i] =
box.Axis(i,
kTRUE)*base*-10.0;
177 if (axis[i].Mag() < base*10.0) {
178 axis[i] =
box.Axis(i,
kTRUE)*base*-10.0;
Concrete class describing an orientated (free) or axis aligned box of 8 vertices.
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...
TGLManip()
Construct a manipulator object, bound to supplied viewer, and no physical shape.
TGLManip & operator=(const TGLManip &)
Assignment operator.
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
virtual Bool_t HandleMotion(const Event_t &event, const TGLCamera &camera)
Handle a mouse button event - return kTRUE if widget selection change kFALSE otherwise.
~TGLManip() override
Destroy manipulator object.
Concrete physical shape - a GL drawable.
static const UChar_t fgRed[4]
static const UChar_t fgBlue[4]
static const UChar_t fgGrey[4]
static const UChar_t fgGreen[4]
static const UChar_t fgYellow[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)
EGEventType fType
of event (see EGEventType)
Int_t fY
pointer x, y coordinates in event window
UInt_t fCode
key or button code