15#include "TGLIncludes.h"
59 p[0][0] = 0;
p[0][1] =
dy;
p[0][2] = 0;
60 p[1][0] =
dx;
p[1][1] =
dy;
p[1][2] = 0;
61 p[2][0] =
dx;
p[2][1] = 0;
p[2][2] = 0;
62 p[3][0] = 0;
p[3][1] = 0;
p[3][2] = 0;
64 p[4][0] = 0;
p[4][1] =
dy;
p[4][2] =
dz;
66 p[6][0] =
dx;
p[6][1] = 0;
p[6][2] =
dz;
67 p[7][0] = 0;
p[7][1] = 0;
p[7][2] =
dz;
317 AntiFlick(0.5f*(
b.fVertices[0][0] +
b.fVertices[6][0]),
318 0.5f*(
b.fVertices[0][1] +
b.fVertices[6][1]),
319 0.5f*(
b.fVertices[0][2] +
b.fVertices[6][2]));
369 using namespace TMath;
380 phi = ATan2(
b.fDir.fY,
b.fDir.fX)*RadToDeg();
381 theta = ATan (
b.fDir.fZ / Sqrt(
b.fDir.fX*
b.fDir.fX +
b.fDir.fY*
b.fDir.fY))*RadToDeg();
399 using namespace TMath;
410 phi = ATan2(
b.fDir.fY,
b.fDir.fX)*RadToDeg();
411 theta = ATan (
b.fDir.fZ / Sqrt(
b.fDir.fX*
b.fDir.fX +
b.fDir.fY*
b.fDir.fY))*RadToDeg();
430 using namespace TMath;
455 throw eH +
"unsupported box-type.";
472 if (
mB.fPlex.Size() > 0)
476 if (!
mB.fSingleColor && !
mB.fValueIsColor &&
mB.fPalette ==
nullptr)
483 if ( !
rnrCtx.IsDrawPassOutlineLine())
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
A GL rendering class for TEveBoxSet.
TEveBoxSetGL()
Default constructor.
Bool_t SetModel(TObject *obj, const Option_t *opt=nullptr) override
Set model object.
void MakeDisplayList() const
Create a display-list for rendering a single box, based on the current box-type.
void DLCacheDrop() override
Called when display lists have been destroyed externally and the internal display-list data needs to ...
void RenderBoxAutoNorm(const Float_t p[8][3]) const
Render box, calculate normals on the fly from first three points.
virtual void Render(TGLRnrCtx &rnrCtx)
Interface for direct rendering from classes that include TEveBoxSet as a member.
void RenderBoxes(TGLRnrCtx &rnrCtx) const
GL rendering for all box-types.
void DLCachePurge() override
Called when display-lists need to be returned to the system.
~TEveBoxSetGL() override
Destructor.
Int_t PrimitiveType() const
Return GL primitive used to render the boxes, based on the render-mode specified in the model object.
void MakeOriginBox(Float_t p[8][3], Float_t dx, Float_t dy, Float_t dz) const
Fill array p to represent a box (0,0,0) - (dx,dy,dz).
Bool_t ShouldDLCache(const TGLRnrCtx &rnrCtx) const override
Determines if display-list will be used for rendering.
void DirectDraw(TGLRnrCtx &rnrCtx) const override
Actual rendering code.
void RenderBoxStdNorm(const Float_t p[8][3]) const
Render a box specified by points in array p with standard axis-aligned normals.
Collection of 3D primitives (fixed-size boxes, boxes of different sizes, or arbitrary sexto-epipeds,...
OpenGL renderer class for TEveDigitSet.
const std::set< Int_t > * fHighlightSet
void DrawFrameIfNeeded(TGLRnrCtx &rnrCtx) const
Make a decision if the frame should be drawn.
Bool_t SetupColor(const TEveDigitSet::DigitBase_t &q) const
Set color for rendering of the specified digit.
ERenderMode_e fRenderMode
Exception class thrown by TEve classes and macros.
virtual void DLCachePurge()
Purge all entries for all LODs for this drawable from the display list cache, returning the reserved ...
virtual Bool_t ShouldDLCache(const TGLRnrCtx &rnrCtx) const
Returns kTRUE if draws should be display list cached kFALSE otherwise.
virtual void DLCacheDrop()
Drop all entries for all LODs for this drawable from the display list cache, WITHOUT returning the re...
void PurgeDLRange(UInt_t base, Int_t size) const
External object is a fake.
Bool_t fDLCache
display-list validity bit-field
Wrapper class for GLU quadric shape drawing object.
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
static Int_t CheckError(const char *loc)
Check current GL error state, outputting details via ROOT Error method if one.
Mother of all ROOT objects.
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
T * Cross(const T v1[3], const T v2[3], T out[3])
Calculates the Cross Product of two vectors: out = [v1 x v2].