Logo ROOT   6.18/05
Reference Guide
TGLParametricEquationGL.cxx
Go to the documentation of this file.
1// @(#)root/gl:$Id$
2// Author: Matevz Tadel, Jun 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
13
14#include "TGLParametric.h"
15#include "TVirtualPad.h"
16
17#include "TGLSurfacePainter.h"
18#include "TGLTF3Painter.h"
19
20#include "TGLRnrCtx.h"
21#include "TGLIncludes.h"
22
23/** \class TGLParametricEquationGL
24\ingroup opengl
25GL-renderer wrapper for TGLParametricEquation.
26This allows rendering of parametric-equations in standard GL viewer.
27*/
28
30
31////////////////////////////////////////////////////////////////////////////////
32/// Constructor.
33
35{
36}
37
38////////////////////////////////////////////////////////////////////////////////
39/// Destructor.
40
42{
43}
44
45////////////////////////////////////////////////////////////////////////////////
46/// Set model object.
47
49{
50 fM = SetModelDynCast<TGLParametricEquation>(obj);
51
53 TString option(opt);
54 fPlotPainter->AddOption(option);
56
57 return kTRUE;
58}
59
60////////////////////////////////////////////////////////////////////////////////
61/// Setup bounding-box.
62
64{
66}
67
68////////////////////////////////////////////////////////////////////////////////
69/// Render the object.
70
72{
74 glPushAttrib(GL_ENABLE_BIT | GL_LIGHTING_BIT);
75 glEnable(GL_NORMALIZE);
78 glPopAttrib();
79}
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassImp(name)
Definition: Rtypes.h:365
void Set(const TGLVertex3 vertex[8])
Set a bounding box from provided 8 vertices.
TGLBoundingBox fBoundingBox
Also plays the role of ID.
GL-renderer wrapper for TGLParametricEquation.
TGLParametricEquation * fM
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
Render the object.
virtual void SetBBox()
Setup bounding-box.
virtual ~TGLParametricEquationGL()
Destructor.
virtual Bool_t SetModel(TObject *obj, const Option_t *opt=0)
Set model object.
Description of TGLPlot3D.
Definition: TGLPlot3D.h:23
TGLPlotPainter * fPlotPainter
Definition: TGLPlot3D.h:29
void SetPainter(TGLPlotPainter *p)
Set painter object and destroy the old one.
Definition: TGLPlot3D.cxx:52
Int_t FindFrontPoint() const
Convert 3d points into window coordinate system and find the nearest.
Definition: TGLPlotBox.cxx:245
const TGLVertex3 * Get3DBox() const
Get 3D box.
Definition: TGLPlotBox.cxx:303
const TGLPlotBox & RefBackBox() const
virtual void DrawPlot() const =0
virtual Bool_t InitGeometry()=0
virtual void InitGL() const =0
virtual void AddOption(const TString &stringOption)=0
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition: TGLRnrCtx.h:41
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:131