Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGLManip Class Referenceabstract

Abstract base class for viewer manipulators, which allow direct in viewer manipulation of a (TGlPhysicalShape) object - currently translation, scaling and rotation along/round objects local axes.

See derived classes for these implementations.

This class provides binding to the zero or one manipulated physical, hit testing (selection) for manipulator sub component (widget), and some common mouse action handling/tracking.

Definition at line 28 of file TGLManip.h.

Public Member Functions

 TGLManip ()
 Construct a manipulator object, bound to supplied viewer, and no physical shape.
 
 TGLManip (TGLPhysicalShape *shape)
 Construct a manipulator object, bound to supplied physical shape.
 
 ~TGLManip () override
 Destroy manipulator object.
 
void Attach (TGLPhysicalShape *shape)
 
virtual void Draw (const TGLCamera &camera) const =0
 
Bool_t GetActive () const
 
TGLPhysicalShapeGetAttached () const
 
UInt_t GetSelectedWidget () const
 
virtual Bool_t HandleButton (const Event_t &event, const TGLCamera &camera)
 Handle a mouse button event - return kTRUE if processed, kFALSE otherwise.
 
virtual Bool_t HandleMotion (const Event_t &event, const TGLCamera &camera)
 Handle a mouse button event - return kTRUE if widget selection change kFALSE otherwise.
 
TClassIsA () const override
 
Bool_t Select (const TGLCamera &, const TGLRect &, const TGLBoundingBox &) override
 
void SetActive (Bool_t a)
 
void SetSelectedWidget (UInt_t s)
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TVirtualGLManip
virtual ~TVirtualGLManip ()
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TVirtualGLManip
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Protected Member Functions

 TGLManip (const TGLManip &)
 last (latest) mouse position (in WINDOW coords)
 
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.
 
const UChar_tColorFor (UInt_t widget) const
 Returns color to be used for given widget.
 
TGLManipoperator= (const TGLManip &)
 Assignment operator.
 

Protected Attributes

Bool_t fActive
 active width (axis) component
 
TPoint fFirstMouse
 manipulator is active?
 
TPoint fLastMouse
 first (start) mouse position (in WINDOW coords)
 
UInt_t fSelectedWidget
 manipulated shape
 
TGLPhysicalShapefShape
 

#include <TGLManip.h>

Inheritance diagram for TGLManip:
[legend]

Constructor & Destructor Documentation

◆ TGLManip() [1/3]

TGLManip::TGLManip ( const TGLManip gm)
protected

last (latest) mouse position (in WINDOW coords)

Copy constructor.

Definition at line 58 of file TGLManip.cxx.

◆ TGLManip() [2/3]

TGLManip::TGLManip ( )

Construct a manipulator object, bound to supplied viewer, and no physical shape.

Definition at line 36 of file TGLManip.cxx.

◆ TGLManip() [3/3]

TGLManip::TGLManip ( TGLPhysicalShape shape)

Construct a manipulator object, bound to supplied physical shape.

Definition at line 47 of file TGLManip.cxx.

◆ ~TGLManip()

TGLManip::~TGLManip ( )
override

Destroy manipulator object.

Definition at line 87 of file TGLManip.cxx.

Member Function Documentation

◆ Attach()

void TGLManip::Attach ( TGLPhysicalShape shape)
inline

Definition at line 58 of file TGLManip.h.

◆ CalcDrawScale()

void TGLManip::CalcDrawScale ( const TGLBoundingBox box,
const TGLCamera camera,
Double_t base,
TGLVector3  axis[3] 
) const
protected

Calculates base and axis scale factor (in world units) for drawing manipulators with reasonable size range in current camera.

Definition at line 153 of file TGLManip.cxx.

◆ Class()

static TClass * TGLManip::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TGLManip::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TGLManip::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 68 of file TGLManip.h.

◆ ColorFor()

const UChar_t * TGLManip::ColorFor ( UInt_t  widget) const
protected

Returns color to be used for given widget.

Definition at line 94 of file TGLManip.cxx.

◆ DeclFileName()

static const char * TGLManip::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 68 of file TGLManip.h.

◆ Draw()

virtual void TGLManip::Draw ( const TGLCamera camera) const
pure virtual

◆ GetActive()

Bool_t TGLManip::GetActive ( ) const
inline

Definition at line 55 of file TGLManip.h.

◆ GetAttached()

TGLPhysicalShape * TGLManip::GetAttached ( ) const
inline

Definition at line 59 of file TGLManip.h.

◆ GetSelectedWidget()

UInt_t TGLManip::GetSelectedWidget ( ) const
inline

Definition at line 52 of file TGLManip.h.

◆ HandleButton()

Bool_t TGLManip::HandleButton ( const Event_t event,
const TGLCamera camera 
)
virtual

Handle a mouse button event - return kTRUE if processed, kFALSE otherwise.

Reimplemented in TGLRotateManip, and TGLScaleManip.

Definition at line 115 of file TGLManip.cxx.

◆ HandleMotion()

Bool_t TGLManip::HandleMotion ( const Event_t event,
const TGLCamera camera 
)
virtual

Handle a mouse button event - return kTRUE if widget selection change kFALSE otherwise.

Reimplemented in TGLRotateManip, TGLScaleManip, and TGLTransManip.

Definition at line 142 of file TGLManip.cxx.

◆ IsA()

TClass * TGLManip::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TVirtualGLManip.

Reimplemented in TGLRotateManip, TGLScaleManip, and TGLTransManip.

Definition at line 68 of file TGLManip.h.

◆ operator=()

TGLManip & TGLManip::operator= ( const TGLManip gm)
protected

Assignment operator.

Definition at line 71 of file TGLManip.cxx.

◆ Select()

Bool_t TGLManip::Select ( const TGLCamera ,
const TGLRect ,
const TGLBoundingBox  
)
inlineoverridevirtual

Implements TVirtualGLManip.

Definition at line 63 of file TGLManip.h.

◆ SetActive()

void TGLManip::SetActive ( Bool_t  a)
inline

Definition at line 56 of file TGLManip.h.

◆ SetSelectedWidget()

void TGLManip::SetSelectedWidget ( UInt_t  s)
inline

Definition at line 53 of file TGLManip.h.

◆ Streamer()

void TGLManip::Streamer ( TBuffer )
overridevirtual

Reimplemented from TVirtualGLManip.

Reimplemented in TGLRotateManip, TGLScaleManip, and TGLTransManip.

◆ StreamerNVirtual()

void TGLManip::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 68 of file TGLManip.h.

Member Data Documentation

◆ fActive

Bool_t TGLManip::fActive
protected

active width (axis) component

Definition at line 33 of file TGLManip.h.

◆ fFirstMouse

TPoint TGLManip::fFirstMouse
protected

manipulator is active?

Definition at line 36 of file TGLManip.h.

◆ fLastMouse

TPoint TGLManip::fLastMouse
protected

first (start) mouse position (in WINDOW coords)

Definition at line 37 of file TGLManip.h.

◆ fSelectedWidget

UInt_t TGLManip::fSelectedWidget
protected

manipulated shape

Definition at line 32 of file TGLManip.h.

◆ fShape

TGLPhysicalShape* TGLManip::fShape
protected

Definition at line 31 of file TGLManip.h.

Libraries for TGLManip:

The documentation for this class was generated from the following files: