Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGLClipPlane Class Reference

Concrete clip plane object.

This can be translated in all directions rotated about the Y/Z local axes (the in-plane axes). It cannot be scaled.

Definition at line 85 of file TGLClip.h.

Public Member Functions

 TGLClipPlane ()
 Fixed color of clip plane.
 
virtual ~TGLClipPlane ()
 Destroy clip plane object.
 
virtual TClassIsA () const
 
virtual void PlaneSet (TGLPlaneSet_t &set) const
 Return set of planes (actually a single one) describing this clip plane.
 
void Set (const TGLPlane &plane)
 Update clip plane object to follow passed 'plane' equation.
 
virtual void Setup (const TGLBoundingBox &bbox)
 Setup the clip object for scene encompassed by bbox.
 
virtual void Setup (const TGLVector3 &point, const TGLVector3 &normal)
 Setup the clipping plane by point and normal.
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TGLClip
 TGLClip (const TGLLogicalShape &logical, const TGLMatrix &transform, const float color[4])
 Construct a stand-alone physical clipping object.
 
virtual ~TGLClip ()
 Destroy clip object.
 
virtual void Draw (TGLRnrCtx &rnrCtx) const
 Draw out clipping object with blending and back + front filling.
 
EMode GetMode () const
 
void IncTimeStamp ()
 
void Invalidate ()
 
Bool_t IsValid () const
 
virtual void Modified ()
 
void SetMode (EMode mode)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
UInt_t TimeStamp () const
 
- Public Member Functions inherited from TGLPhysicalShape
 TGLPhysicalShape (UInt_t ID, const TGLLogicalShape &logicalShape, const Double_t *transform, Bool_t invertedWind, const Float_t rgba[4])
 Construct a physical shape using arguments:
 
 TGLPhysicalShape (UInt_t ID, const TGLLogicalShape &logicalShape, const TGLMatrix &transform, Bool_t invertedWind, const Float_t rgba[4])
 Construct a physical shape using arguments:
 
virtual ~TGLPhysicalShape ()
 Destroy the physical shape.
 
void AddReference (TGLPShapeRef *ref)
 Add reference ref.
 
const TGLBoundingBoxBoundingBox () const
 
virtual void CalculateShapeLOD (TGLRnrCtx &rnrCtx, Float_t &pixSize, Short_t &shapeLOD) const
 Calculate shape-lod, suitable for use under projection defined by 'rnrCtx', taking account of which local axes of the shape support LOD adjustment, and the global 'sceneFlags' passed.
 
const Float_tColor () const
 
const TGLLogicalShapeGetLogical () const
 
EManip GetManip () const
 
const TGLPhysicalShapeGetNextPhysical () const
 
TGLVector3 GetScale () const
 
UChar_t GetSelected () const
 
TGLVertex3 GetTranslation () const
 
UInt_t ID () const
 
void InvokeContextMenu (TContextMenu &menu, UInt_t x, UInt_t y) const
 Request creation of context menu on shape, attached to 'menu' at screen position 'x' 'y'.
 
Bool_t IsInvisible () const
 
Bool_t IsModified () const
 
Bool_t IsSelected () const
 
Bool_t IsTransparent () const
 
void Modified ()
 Call this after modifying the physical so that the information can be propagated to the object referencing it.
 
virtual void QuantizeShapeLOD (Short_t shapeLOD, Short_t combiLOD, Short_t &quantLOD) const
 Factor in scene/vierer LOD and Quantize ... forward to logical shape.
 
void RemoveReference (TGLPShapeRef *ref)
 Remove reference ref.
 
void Rotate (const TGLVertex3 &pivot, const TGLVector3 &axis, Double_t angle)
 
void Scale (const TGLVector3 &scale)
 
void Select (UChar_t select)
 
void SetColor (const Float_t rgba[17])
 Set full color attributes - see OpenGL material documentation for full description.
 
void SetColorOnFamily (const Float_t rgba[17])
 Set full color attributes to all physicals sharing the same logical with this object.
 
void SetDiffuseColor (Color_t ci, UChar_t transparency)
 Set color from standard ROOT representation, that is color index.
 
void SetDiffuseColor (const Float_t rgba[4])
 Set color from ROOT color index and transparency [0,100].
 
void SetDiffuseColor (const UChar_t rgba[4])
 Set color from RGBA quadruplet.
 
void SetManip (EManip manip)
 
void SetTransform (const Double_t vals[16])
 
void SetTransform (const TGLMatrix &transform)
 
void SetTranslation (const TGLVertex3 &translation)
 
void SetupGLColors (TGLRnrCtx &rnrCtx, const Float_t *color=nullptr) const
 Setup colors - avoid setting things not required for current draw flags.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
void Translate (const TGLVector3 &vect)
 

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 TGLClip
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TGLPhysicalShape
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Static Private Attributes

static const float fgColor [4] = { 1.0, 0.6, 0.2, 0.5 }
 

Additional Inherited Members

- Public Types inherited from TGLClip
enum  EMode { kOutside , kInside }
 
enum  EType { kClipNone = 0 , kClipPlane , kClipBox }
 
- Public Types inherited from TGLPhysicalShape
enum  EManip {
  kTranslateX = 1 << 0 , kTranslateY = 1 << 1 , kTranslateZ = 1 << 2 , kTranslateAll = kTranslateX | kTranslateY | kTranslateZ ,
  kScaleX = 1 << 3 , kScaleY = 1 << 4 , kScaleZ = 1 << 5 , kScaleAll = kScaleX | kScaleY | kScaleZ ,
  kRotateX = 1 << 6 , kRotateY = 1 << 7 , kRotateZ = 1 << 8 , kRotateAll = kRotateX | kRotateY | kRotateZ ,
  kManipAll = kTranslateAll | kScaleAll | kRotateAll
}
 
- Protected Attributes inherited from TGLClip
EMode fMode
 
UInt_t fTimeStamp
 
Bool_t fValid
 

#include <TGLClip.h>

Inheritance diagram for TGLClipPlane:
[legend]

Constructor & Destructor Documentation

◆ TGLClipPlane()

TGLClipPlane::TGLClipPlane ( )

Fixed color of clip plane.

Construct a clip plane object, based on supplied 'plane', with initial manipulation pivot at 'center', with drawn extents (in local x/y axes) of 'extents'.

Plane can have center pivot translated in all directions, and rotated round center in X/Y axes , the in-plane axes. It cannot be scaled

Note theoretically a plane is of course infinite - however we want to draw the object in viewer - so we fake it with a single GL face (polygon) - extents defines the width/depth of this - should be several times scene extents - see Setup().

Definition at line 161 of file TGLClip.cxx.

◆ ~TGLClipPlane()

TGLClipPlane::~TGLClipPlane ( )
virtual

Destroy clip plane object.

Definition at line 174 of file TGLClip.cxx.

Member Function Documentation

◆ Class()

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

◆ Class_Name()

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

◆ Class_Version()

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

Definition at line 101 of file TGLClip.h.

◆ DeclFileName()

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

Definition at line 101 of file TGLClip.h.

◆ IsA()

virtual TClass * TGLClipPlane::IsA ( ) const
inlinevirtual
Returns
TClass describing current object

Reimplemented from TGLClip.

Definition at line 101 of file TGLClip.h.

◆ PlaneSet()

void TGLClipPlane::PlaneSet ( TGLPlaneSet_t set) const
virtual

Return set of planes (actually a single one) describing this clip plane.

Implements TGLClip.

Definition at line 242 of file TGLClip.cxx.

◆ Set()

void TGLClipPlane::Set ( const TGLPlane plane)

Update clip plane object to follow passed 'plane' equation.

Center pivot is shifted to nearest point on new plane.

Definition at line 230 of file TGLClip.cxx.

◆ Setup() [1/2]

void TGLClipPlane::Setup ( const TGLBoundingBox bbox)
virtual

Setup the clip object for scene encompassed by bbox.

Implements TGLClip.

Definition at line 181 of file TGLClip.cxx.

◆ Setup() [2/2]

void TGLClipPlane::Setup ( const TGLVector3 point,
const TGLVector3 normal 
)
virtual

Setup the clipping plane by point and normal.

Length of the normal determines the size of the plane drawn in GL viewer. The normal points into the direction of visible half-plane.

This only makes sense if you disable auto-update of the clip-object:

gl_viewer->SetClipAutoUpdate(kFALSE).

After calling this also call gl_viewer->RefreshPadEditor(gl_viewer) and gl_viewer->RequestDraw().

Reimplemented from TGLClip.

Definition at line 206 of file TGLClip.cxx.

◆ Streamer()

virtual void TGLClipPlane::Streamer ( TBuffer )
virtual

Reimplemented from TGLClip.

◆ StreamerNVirtual()

void TGLClipPlane::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 101 of file TGLClip.h.

Member Data Documentation

◆ fgColor

const float TGLClipPlane::fgColor = { 1.0, 0.6, 0.2, 0.5 }
staticprivate

Definition at line 88 of file TGLClip.h.

Libraries for TGLClipPlane:

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