16#include "TGLIncludes.h"
50 virtual void Draw()
const = 0;
66 void Draw()
const override;
82 void Draw()
const override;
96 void Draw()
const override;
110 void Draw()
const override;
116 fRmin1(
r1), fRmax1(
r2), fRmin2(
r3), fRmax2(
r4),
117 fDz(
dz), fNlow(
l), fNhigh(
h)
190 for (
Int_t i = 0,
e = (
fLOD + 1) * 2; i <
e; ++i) {
286 for (
Int_t i = 0,
e = (
fLOD + 1) * 2; i <
e; ++i) {
363 for (
Int_t i = 0,
e = (
fLOD + 1) * 2,
j = 0; i <
e; ++i) {
535 switch (buffer.
Type())
553 Error(
"TGLCylinder::TGLCylinder",
"cannot cast TBuffer3D");
566 Error(
"TGLCylinder::TGLCylinder",
"cannot cast TBuffer3D");
570 for (
UInt_t i =0; i < 3; i++) {
594 if (
lod >= 100) off = 0;
595 else if (
lod < 10) off =
lod / 2;
596 else off =
lod / 10 + 4;
630 Info(
"TGLCylinder::DirectDraw",
"this %zd (class %s) LOD %d",
631 (
size_t)
this,
IsA()->GetName(),
rnrCtx.ShapeLOD());
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.
TGLVector3 gHighNormalDefault(0., 0., 1.)
TGLVector3 gLowNormalDefault(0., 0., -1.)
Cut tube segment description class - see TBuffer3DTypes for producer classes.
Tube segment description class - see TBuffer3DTypes for producer classes.
Complete tube description class - see TBuffer3DTypes for producer classes.
TGLVertex3 fMesh[(TGLRnrCtx::kLODHigh+1) *4+2]
TGLVector3 fNorm[(TGLRnrCtx::kLODHigh+1) *4+2]
TCylinderMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t dz, const TGLVector3 &l=gLowNormalDefault, const TGLVector3 &h=gHighNormalDefault)
constructor
void Draw() const override
draw cylinder mesh
TGLVector3 fNorm[(TGLRnrCtx::kLODHigh+1) *4+10]
TGLVertex3 fMesh[(TGLRnrCtx::kLODHigh+1) *4+10]
TCylinderSegMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t dz, Double_t phi1, Double_t phi2, const TGLVector3 &l=gLowNormalDefault, const TGLVector3 &h=gHighNormalDefault)
One quad mesh and two fans.
void Draw() const override
Cylinder segment is drawn as one quad strip and two triangle fans.
Implements a native ROOT-GL cylinder that can be rendered at different levels of detail.
TGLVector3 fHighPlaneNorm
void DirectDraw(TGLRnrCtx &rnrCtx) const override
Debug tracing.
TGLCylinder(const TBuffer3DTube &buffer)
Copy out relevant parts of buffer - we create and delete mesh parts on demand in DirectDraw() and the...
TClass * IsA() const override
~TGLCylinder() override
destructor
Short_t QuantizeShapeLOD(Short_t shapeLOD, Short_t combiLOD) const override
Factor in scene/viewer LOD and quantize.
UInt_t DLOffset(Short_t lod) const override
Return display-list offset for given LOD.
Abstract logical shape - a GL 'drawable' - base for all shapes - faceset sphere etc.
Int_t fDLSize
display-list id base
const TGLVertex3 & MakeVertex(Double_t x, Double_t y, Double_t z) const
make vertex
virtual void Draw() const =0
TGLMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t r3, Double_t r4, Double_t dz, const TGLVector3 &l=gLowNormalDefault, const TGLVector3 &h=gHighNormalDefault)
Double_t GetZcoord(Double_t x, Double_t y, Double_t z) const
get Z coordinate
void GetNormal(const TGLVertex3 &vertex, TGLVector3 &normal) const
get normal
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
3 component (x/y/z) vector class.
3 component (x/y/z) vertex class.
TGLVertex3 fMesh[(TGLRnrCtx::kLODHigh+1) *8]
TubeMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t r3, Double_t r4, Double_t dz, const TGLVector3 &l=gLowNormalDefault, const TGLVector3 &h=gHighNormalDefault)
constructor
TGLVector3 fNorm[(TGLRnrCtx::kLODHigh+1) *8]
void Draw() const override
Tube is drawn as four quad strips.
TGLVertex3 fMesh[(TGLRnrCtx::kLODHigh+1) *8+8]
TGLVector3 fNorm[(TGLRnrCtx::kLODHigh+1) *8+8]
TubeSegMesh(UInt_t LOD, Double_t r1, Double_t r2, Double_t r3, Double_t r4, Double_t dz, Double_t phi1, Double_t phi2, const TGLVector3 &l=gLowNormalDefault, const TGLVector3 &h=gHighNormalDefault)
void Draw() const override
Tube segment is drawn as three quad strips.
T * Normal2Plane(const T v1[3], const T v2[3], const T v3[3], T normal[3])
Calculates a normal vector of a plane.
constexpr Double_t DegToRad()
Conversion from degree to radian: .
Double_t Sqrt(Double_t x)
Returns the square root of x.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
constexpr Double_t TwoPi()