15#include "TGLIncludes.h"
47 if (
Dot(cross,ref) > 0.0) {
244 Error(
"TGLRotateManip::CalculateAngleDelta",
"active ring plane parallel to near clip?");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Double_t Dot(const TGLVector3 &v1, const TGLVector3 &v2)
std::pair< Bool_t, TGLLine3 > Intersection(const TGLPlane &p1, const TGLPlane &p2)
Find 3D line interestion of this plane with 'other'.
TGLVector3 Cross(const TGLVector3 &v1, const TGLVector3 &v2)
Option_t Option_t TPoint TPoint angle
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...
3D space, fixed length, line class, with direction / length 'vector', passing through point 'vertex'.
const TGLVector3 & Vector() const
const TGLVertex3 & Start() const
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.
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.
const TGLBoundingBox & BoundingBox() const
void Rotate(const TGLVertex3 &pivot, const TGLVector3 &axis, Double_t angle)
void Set(const TGLPlane &other)
Assign from other.
TGLVertex3 NearestOn(const TGLVertex3 &point) const
Return nearest point on plane.
Rotate manipulator - attaches to physical shape and draws local axes widgets - rings drawn from attac...
Bool_t fShallowFront
does active ring form shallow angle to eye?
TGLLine3 CalculateRingLine(const TPoint &mouse, const TGLCamera &camera) const
Calculated interaction line between 'mouse' viewport point, and current selected widget (ring),...
Double_t CalculateAngleDelta(const TPoint &mouse, const TGLCamera &camera)
Calculate angle delta for rotation based on new mouse position.
TGLPlane fActiveRingPlane
front or back of the active shallow ring?
TGLLine3 fRingLine
center of active ring
void Draw(const TGLCamera &camera) const override
Draw rotate manipulator - axis rings drawn from attached physical center, in plane defined by axis as...
Bool_t HandleMotion(const Event_t &event, const TGLCamera &camera) override
Handle mouse motion over manipulator - if active (selected widget) rotate physical around selected ri...
TGLVertex3 fActiveRingCenter
plane of the active ring (widget)
~TGLRotateManip() override
Destroy the rotation manipulator.
TGLRotateManip()
Construct rotation manipulator not bound to any physical shape.
Bool_t HandleButton(const Event_t &event, const TGLCamera &camera) override
Handle mouse button event over manipulator - returns kTRUE if redraw required kFALSE otherwise.
static Double_t Angle(const TGLVector3 &v1, const TGLVector3 &v2)
Calculate unsigned angle between vectors v1 and v2.
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 void DrawRing(const TGLVertex3 ¢er, const TGLVector3 &normal, Double_t radius, const UChar_t *rgba)
Draw ring, centered on 'center', lying on plane defined by 'center' & 'normal' of outer radius 'radiu...
static const UChar_t fgGrey[4]
static const UChar_t fgYellow[4]
3 component (x/y/z) vector class.
3 component (x/y/z) vertex class.
void Set(Double_t x, Double_t y, Double_t z)
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Double_t ACos(Double_t)
Returns the principal value of the arc cosine of x, expressed in radians.
Double_t ASin(Double_t)
Returns the principal value of the arc sine of x, expressed in radians.
Int_t fY
pointer x, y coordinates in event window