Logo ROOT   6.14/05
Reference Guide
Namespaces | Macros | Functions | Variables
TGLUtil.cxx File Reference
#include <algorithm>
#include <cassert>
#include <string>
#include <map>
#include "THLimitsFinder.h"
#include "TVirtualPad.h"
#include "TVirtualX.h"
#include "Riostream.h"
#include "TStyle.h"
#include "TGaxis.h"
#include "TColor.h"
#include "TError.h"
#include "TH1.h"
#include "TMath.h"
#include "TROOT.h"
#include "TClass.h"
#include "TEnv.h"
#include "TGLBoundingBox.h"
#include "TGLCamera.h"
#include "TGLPlotPainter.h"
#include "TGLIncludes.h"
#include "TGLQuadric.h"
#include "TGLUtil.h"
Include dependency graph for TGLUtil.cxx:

Namespaces

 Rgl
 

Macros

#define CALLBACK
 

Functions

Int_t Rgl::ColorToObjectID (const UChar_t *color, Bool_t highColor)
 
void Rgl::CylindricalNormal (const Double_t *v, Double_t *normal)
 
void Rgl::CylindricalNormalInv (const Double_t *v, Double_t *normal)
 
void Rgl::Draw2DAxis (TAxis *axis, Double_t xMin, Double_t yMin, Double_t xMax, Double_t yMax, Double_t min, Double_t max, Bool_t log, Bool_t z=kFALSE)
 
void Rgl::DrawAxes (Int_t fp, const Int_t *vp, const TGLVertex3 *box, const TGLPlotCoordinates *coord, TAxis *xAxis, TAxis *yAxis, TAxis *zAxis)
 Using front point, find, where to draw axes and which labels to use for them gVirtualX->SelectWindow(gGLManager->GetVirtualXInd(fGLDevice)); gVirtualX->SetDrawMode(TVirtualX::kCopy);//TCanvas by default sets in kInverse. More...
 
void Rgl::DrawBoxFront (Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax, Int_t fp)
 Draws lego's bar as a 3d box. More...
 
void Rgl::DrawBoxFrontTextured (Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax, Double_t texMin, Double_t texMax, Int_t fp)
 Draws lego's bar as a 3d box LULULULU. More...
 
void Rgl::DrawBoxWithGradientFill (Double_t y1, Double_t y2, Double_t x1, Double_t x2, const Double_t *rgba1, const Double_t *rgba2)
 
void Rgl::DrawCylinder (TGLQuadric *quadric, Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax)
 Cylinder for lego3. More...
 
void Rgl::DrawError (Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax)
 
void Rgl::DrawFaceTextured (const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, Double_t t1, Double_t t2, Double_t t3, const TGLVector3 &norm1, const TGLVector3 &norm2, const TGLVector3 &norm3)
 Draw textured triangle. More...
 
void Rgl::DrawFaceTextured (const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, Double_t t1, Double_t t2, Double_t t3, Double_t z, const TGLVector3 &normal)
 Draw textured triangle on a plane. More...
 
void Rgl::DrawQuadFilled (const TGLVertex3 &v0, const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, const TGLVector3 &normal)
 Draw quad face. More...
 
void Rgl::DrawQuadFilled (const Double_t *v0, const Double_t *v1, const Double_t *v2, const Double_t *v3, const Double_t *normal)
 Draw quad face. More...
 
void Rgl::DrawQuadOutline (const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, const TGLVertex3 &v4)
 Draw quad outline. More...
 
void Rgl::DrawQuadStripWithRadialGradientFill (unsigned nPoints, const Double_t *inner, const Double_t *innerRGBA, const Double_t *outer, const Double_t *outerRGBA)
 TODO: is it possible to use GLdouble to avoid problems with Double_t/GLdouble if they are not the same type? More...
 
void Rgl::DrawSmoothFace (const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, const TGLVector3 &norm1, const TGLVector3 &norm2, const TGLVector3 &norm3)
 Draws triangle face, each vertex has its own averaged normal. More...
 
void Rgl::DrawSphere (TGLQuadric *quadric, Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax)
 Cylinder for lego3. More...
 
void Rgl::DrawTransparentBox (Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax, Int_t fp)
 Draws lego's bar as a 3d box. More...
 
void Rgl::DrawTrapezoid (const Double_t ver[][2], Double_t zMin, Double_t zMax, Bool_t color=kTRUE)
 
void Rgl::DrawTrapezoid (const Double_t ver[][3])
 
void Rgl::DrawTrapezoidTextured (const Double_t ver[][2], Double_t zMin, Double_t zMax, Double_t texMin, Double_t texMax)
 In polar coordinates, box became trapezoid. More...
 
void Rgl::DrawTrapezoidTextured (const Double_t ver[][3], Double_t texMin, Double_t texMax)
 
void Rgl::DrawTrapezoidTextured2 (const Double_t ver[][2], Double_t zMin, Double_t zMax, Double_t texMin, Double_t texMax)
 In polar coordinates, box became trapezoid. More...
 
void Rgl::GetColor (Float_t v, Float_t vmin, Float_t vmax, Int_t type, Float_t *rgba)
 This function creates color for parametric surface's vertex, using its 'u' value. More...
 
std::pair< Bool_t, TGLLine3Intersection (const TGLPlane &p1, const TGLPlane &p2)
 Find 3D line interestion of this plane with 'other'. More...
 
std::pair< Bool_t, TGLVertex3Intersection (const TGLPlane &p1, const TGLPlane &p2, const TGLPlane &p3)
 
std::pair< Bool_t, TGLVertex3Intersection (const TGLPlane &plane, const TGLLine3 &line, Bool_t extend)
 Find intersection of 3D space 'line' with this plane. More...
 
void Rgl::ObjectIDToColor (Int_t objectID, Bool_t highColor)
 Object id encoded as rgb triplet. More...
 
void Rgl::SetZLevels (TAxis *zAxis, Double_t zMin, Double_t zMax, Double_t zScale, std::vector< Double_t > &zLevels)
 
void Rgl::SphericalNormal (const Double_t *v, Double_t *normal)
 
void Rgl::SphericalNormalInv (const Double_t *v, Double_t *normal)
 

Variables

const Int_t Rgl::gAxisType [][2] = {{1, 0}, {0, 1}, {1, 0}, {0, 1}}
 
const Double_t Rgl::gBoxBackNormals [][3] = {{0., -1., 0.}, {-1., 0., 0.}, {0., 1., 0.}, {1., 0., 0.}}
 
const Int_t Rgl::gBoxBackPlanes [][2] = {{0, 1}, {3, 0}, {2, 3}, {1, 2}}
 
const Int_t Rgl::gBoxBackQuads [][4] = {{7, 1, 2, 6}, {4, 7, 6, 5}, {0, 4, 5, 3}, {0, 3, 2, 1}}
 
const Double_t Rgl::gBoxFrontNormals [][3] = {{-1., 0., 0.}, {0., -1., 0.}, {1., 0., 0.}, {0., 1., 0.}}
 
const Int_t Rgl::gBoxFrontPlanes [][2] = {{0, 1}, {1, 2}, {2, 3}, {3, 0}}
 
const Int_t Rgl::gBoxFrontQuads [][4] = {{0, 1, 2, 3}, {4, 0, 3, 5}, {4, 5, 6, 7}, {7, 6, 2, 1}}
 
const Int_t Rgl::gFramePoints [][2] = {{3, 1}, {0, 2}, {1, 3}, {2, 0}}
 

Macro Definition Documentation

◆ CALLBACK

#define CALLBACK

Definition at line 1449 of file TGLUtil.cxx.

Function Documentation

◆ Intersection() [1/3]

std::pair<Bool_t, TGLLine3> Intersection ( const TGLPlane p1,
const TGLPlane p2 
)

Find 3D line interestion of this plane with 'other'.

Returns a std::pair

first (Bool_t) second (TGLLine3) kTRUE - planes intersect intersection line between planes kFALSE - no intersect (parallel) undefined

Definition at line 544 of file TGLUtil.cxx.

◆ Intersection() [2/3]

std::pair<Bool_t, TGLVertex3> Intersection ( const TGLPlane p1,
const TGLPlane p2,
const TGLPlane p3 
)

Definition at line 559 of file TGLUtil.cxx.

◆ Intersection() [3/3]

std::pair<Bool_t, TGLVertex3> Intersection ( const TGLPlane plane,
const TGLLine3 line,
Bool_t  extend 
)

Find intersection of 3D space 'line' with this plane.

If 'extend' is kTRUE then line extents can be extended (infinite length) to find intersection. If 'extend' is kFALSE the fixed extents of line is respected.

The return a std::pair

  • first (Bool_t) second (TGLVertex3)
  • kTRUE - line/plane intersect intersection vertex on plane
  • kFALSE - no line/plane intersect undefined

If intersection is not found (first == kFALSE) & 'extend' was kTRUE (infinite line) this implies line and plane are parallel. If 'extend' was kFALSE, then either line parallel or insufficient length.

Definition at line 587 of file TGLUtil.cxx.