ROOT » GRAF3D » GL » TGLParametricPlot

class TGLParametricPlot: public TGLPlotPainter

 A parametric surface is a surface defined by a parametric equation, involving
 two parameters (u, v):

 S(u, v) = (x(u, v), y(u, v), z(u, v)).
 For example, "limpet torus" surface can be defined as:
    x = cos(u) / (sqrt(2) + sin(v))
    y = sin(u) / (sqrt(2) + sin(v))
    z = 1 / (sqrt(2) + cos(v)),
 where -pi <= u <= pi, -pi <= v <= pi.

 TGLParametricEquation * eq =
    new TGLParametricEquation("Limpet_torus", "cos(u) / (sqrt(2.) + sin(v))",
                              "sin(u) / (sqrt(2.) + sin(v))",
                              "1 / (sqrt(2) + cos(v))");

 $ROOTSYS/tutorials/gl/glparametric.C contains more examples.

 Parametric equations can be specified:
    1. by string expressions, as with TF2, but with 'u' instead of 'x' and
       'v' instead of 'y'.
    2. by function - see ParametricEquation_t declaration.

Function Members (Methods)

virtual voidDeInitGL() const
virtual voidDrawPlot() const
virtual voidDrawSectionXOY() const
virtual voidDrawSectionXOZ() const
virtual voidDrawSectionYOZ() const
virtual voidInitGL() const
TGLParametricPlot&operator=(const TGLParametricPlot&)
voidSetSurfaceColor() const
TGLParametricPlot(const TGLParametricPlot&)

Data Members

static TGLParametricPlot::EMeshSizekHigh
static TGLParametricPlot::EMeshSizekLow

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGLParametricPlot(TGLParametricEquation* equation, TGLPlotCamera* camera)
Bool_t InitGeometry()
Build mesh. The surface is 'immutable':
the only reason to rebuild it - the change in size or
if one of equations contain reference to TF2 function, whose
parameters were changed.
void StartPan(Int_t px, Int_t py)
User clicks right mouse button (in a pad).
void Pan(Int_t px, Int_t py)
User's moving mouse cursor, with middle mouse button pressed (for pad).
Calculate 3d shift related to 2d mouse movement.
char * GetPlotInfo(Int_t px, Int_t py)
No object info yet.
void AddOption(const TString& option)
No additional options for parametric surfaces.
void ProcessEvent(Int_t event, Int_t px, Int_t py)
Change color/mesh size or switch on/off mesh/box cut.
Left double click - remove box cut.
void InitGL() const
Initialize gl state.
void DeInitGL() const
Initialize gl state.
void DrawPlot() const
Draw parametric surface.
void InitColors()
Calculate colors for vertices,
using one of 20 color themes.
-1 simple 'metal' surface.
void DrawSectionXOZ() const
No such sections.
void DrawSectionYOZ() const
No such sections.
void DrawSectionXOY() const
No such sections.
void SetSurfaceColor() const
Set material properties.
TGLParametricPlot(TGLParametricEquation* equation, TGLPlotCamera* camera)