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.
Public Types | |
| 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 } |
| enum | EMode { kOutside , kInside } |
| enum | EType { kClipNone = 0 , kClipPlane , kClipBox } |
Public Member Functions | |
| TGLClipPlane () | |
| 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'. | |
| ~TGLClipPlane () override | |
| Destroy clip plane object. | |
| void | AddReference (TGLPShapeRef *ref) |
| Add reference ref. | |
| const TGLBoundingBox & | BoundingBox () 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_t * | Color () const |
| void | Draw (TGLRnrCtx &rnrCtx) const override |
| Draw out clipping object with blending and back + front filling. | |
| const TGLLogicalShape * | GetLogical () const |
| EManip | GetManip () const |
| EMode | GetMode () const |
| const TGLPhysicalShape * | GetNextPhysical () const |
| TGLVector3 | GetScale () const |
| UChar_t | GetSelected () const |
| TGLVertex3 | GetTranslation () const |
| UInt_t | ID () const |
| void | IncTimeStamp () |
| void | Invalidate () |
| 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'. | |
| TClass * | IsA () const override |
| Bool_t | IsInvisible () const |
| Bool_t | IsModified () const |
| Bool_t | IsSelected () const |
| Bool_t | IsTransparent () const |
| Bool_t | IsValid () const |
| virtual void | Modified () |
| void | PlaneSet (TGLPlaneSet_t &set) const override |
| Return set of planes (actually a single one) describing this clip plane. | |
| 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 | Set (const TGLPlane &plane) |
| Update clip plane object to follow passed 'plane' equation. | |
| 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 | SetMode (EMode mode) |
| void | SetTransform (const Double_t vals[16]) |
| void | SetTransform (const TGLMatrix &transform) |
| void | SetTranslation (const TGLVertex3 &translation) |
| void | Setup (const TGLBoundingBox &bbox) override |
| Setup the clip object for scene encompassed by bbox. | |
| void | Setup (const TGLVector3 &point, const TGLVector3 &normal) override |
| Setup the clipping plane by point and normal. | |
| void | SetupGLColors (TGLRnrCtx &rnrCtx, const Float_t *color=nullptr) const |
| Setup colors - avoid setting things not required for current draw flags. | |
| void | Streamer (TBuffer &) override |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
| UInt_t | TimeStamp () const |
| void | Translate (const TGLVector3 &vect) |
Static Public Member Functions | |
| static TClass * | Class () |
| static const char * | Class_Name () |
| static constexpr Version_t | Class_Version () |
| static const char * | DeclFileName () |
Protected Attributes | |
| EMode | fMode |
| UInt_t | fTimeStamp |
| Bool_t | fValid |
Private Member Functions | |
| void | InitColor (const Float_t rgba[4]) |
| Initialise the colors, using basic RGBA diffuse material color supplied. | |
| void | UpdateBoundingBox () |
| Update our internal bounding box (in global frame). | |
Private Attributes | |
| TGLBoundingBox | fBoundingBox |
| ! bounding box of the physical (transformed) | |
| Float_t | fColor [17] |
| ! GL color array | |
| TGLPShapeRef * | fFirstPSRef |
| ! pointer to first reference | |
| UInt_t | fID |
| ! unique physical ID within containing scene | |
| Bool_t | fInvertedWind |
| ! face winding TODO: can get directly from fTransform? | |
| Bool_t | fIsScaleForRnr |
| ! cache | |
| const TGLLogicalShape * | fLogicalShape |
| ! the associated logical shape | |
| EManip | fManip |
| ! permitted manipulation bitflags - see EManip | |
| Bool_t | fModified |
| ! has been modified - retain across scene rebuilds | |
| TGLPhysicalShape * | fNextPhysical |
| ! pointer to next replica | |
| UChar_t | fSelected |
| ! selected state | |
| TGLMatrix | fTransform |
| ! transform (placement) of physical instance | |
Static Private Attributes | |
| static const float | fgColor [4] = { 1.0, 0.6, 0.2, 0.5 } |
| ! Fixed color of clip plane | |
#include <TGLClip.h>
|
inherited |
| Enumerator | |
|---|---|
| kTranslateX | |
| kTranslateY | |
| kTranslateZ | |
| kTranslateAll | |
| kScaleX | |
| kScaleY | |
| kScaleZ | |
| kScaleAll | |
| kRotateX | |
| kRotateY | |
| kRotateZ | |
| kRotateAll | |
| kManipAll | |
Definition at line 41 of file TGLPhysicalShape.h.
|
inherited |
|
inherited |
| TGLClipPlane::TGLClipPlane | ( | ) |
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 159 of file TGLClip.cxx.
|
override |
Destroy clip plane object.
Definition at line 172 of file TGLClip.cxx.
|
inherited |
Add reference ref.
Definition at line 138 of file TGLPhysicalShape.cxx.
|
inlineinherited |
Definition at line 88 of file TGLPhysicalShape.h.
|
virtualinherited |
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.
Returned shapeLOD component is from 0 (kLODPixel - lowest quality) to 100 (kLODHigh - highest quality).
Scene flags are not used. LOD quantization is not done. RnrCtx is not modified as this is called via lodification stage of rendering.
Definition at line 430 of file TGLPhysicalShape.cxx.
|
static |
|
static |
|
inlinestaticconstexpr |
|
inlineinherited |
Definition at line 113 of file TGLPhysicalShape.h.
|
inlinestatic |
|
overridevirtualinherited |
Draw out clipping object with blending and back + front filling.
Some clip objects are single face which we want to see both sides of.
Reimplemented from TGLPhysicalShape.
Definition at line 119 of file TGLClip.cxx.
|
inlineinherited |
Definition at line 96 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 100 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 97 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 141 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 109 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 147 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 87 of file TGLPhysicalShape.h.
|
privateinherited |
Initialise the colors, using basic RGBA diffuse material color supplied.
Definition at line 206 of file TGLPhysicalShape.cxx.
|
inherited |
Request creation of context menu on shape, attached to 'menu' at screen position 'x' 'y'.
Definition at line 509 of file TGLPhysicalShape.cxx.
|
inlineoverridevirtual |
|
inlineinherited |
Definition at line 115 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 105 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 108 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 114 of file TGLPhysicalShape.h.
|
overridevirtual |
Return set of planes (actually a single one) describing this clip plane.
Implements TGLClip.
Definition at line 240 of file TGLClip.cxx.
|
virtualinherited |
Factor in scene/vierer LOD and Quantize ... forward to logical shape.
Definition at line 500 of file TGLPhysicalShape.cxx.
|
inherited |
Remove reference ref.
Definition at line 149 of file TGLPhysicalShape.cxx.
|
inlineinherited |
Definition at line 197 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 185 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 110 of file TGLPhysicalShape.h.
| 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 228 of file TGLClip.cxx.
|
inherited |
Set full color attributes - see OpenGL material documentation for full description.
0->3 diffuse, 4->7 ambient, 8->11 specular, 12->15 emission, 16 shininess
Definition at line 226 of file TGLPhysicalShape.cxx.
|
inherited |
Set full color attributes to all physicals sharing the same logical with this object.
Definition at line 240 of file TGLPhysicalShape.cxx.
Set color from standard ROOT representation, that is color index.
Definition at line 274 of file TGLPhysicalShape.cxx.
|
inherited |
Set color from ROOT color index and transparency [0,100].
Definition at line 253 of file TGLPhysicalShape.cxx.
|
inherited |
Set color from RGBA quadruplet.
Definition at line 263 of file TGLPhysicalShape.cxx.
|
inlineinherited |
Definition at line 101 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 161 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 153 of file TGLPhysicalShape.h.
|
inlineinherited |
Definition at line 169 of file TGLPhysicalShape.h.
|
overridevirtual |
Setup the clip object for scene encompassed by bbox.
Implements TGLClip.
Definition at line 179 of file TGLClip.cxx.
|
overridevirtual |
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 204 of file TGLClip.cxx.
|
inherited |
Setup colors - avoid setting things not required for current draw flags.
Definition at line 291 of file TGLPhysicalShape.cxx.
|
inline |
|
inlineinherited |
Definition at line 177 of file TGLPhysicalShape.h.
|
privateinherited |
Update our internal bounding box (in global frame).
Definition at line 192 of file TGLPhysicalShape.cxx.
|
privateinherited |
! bounding box of the physical (transformed)
Definition at line 63 of file TGLPhysicalShape.h.
|
privateinherited |
! GL color array
Definition at line 64 of file TGLPhysicalShape.h.
|
privateinherited |
! pointer to first reference
Definition at line 59 of file TGLPhysicalShape.h.
|
staticprivate |
|
privateinherited |
! unique physical ID within containing scene
Definition at line 61 of file TGLPhysicalShape.h.
|
privateinherited |
! face winding TODO: can get directly from fTransform?
Definition at line 67 of file TGLPhysicalShape.h.
|
privateinherited |
! cache
Definition at line 69 of file TGLPhysicalShape.h.
|
privateinherited |
! the associated logical shape
Definition at line 57 of file TGLPhysicalShape.h.
|
privateinherited |
! permitted manipulation bitflags - see EManip
Definition at line 65 of file TGLPhysicalShape.h.
|
privateinherited |
! has been modified - retain across scene rebuilds
Definition at line 68 of file TGLPhysicalShape.h.
|
privateinherited |
! pointer to next replica
Definition at line 58 of file TGLPhysicalShape.h.
|
privateinherited |
! selected state
Definition at line 66 of file TGLPhysicalShape.h.
|
privateinherited |
! transform (placement) of physical instance
Definition at line 62 of file TGLPhysicalShape.h.