ROOT
git-r3/HEAD
Reference Guide
Loading...
Searching...
No Matches
TGLQuadric.cxx
Go to the documentation of this file.
1
// @(#)root/gl:$Id$
2
3
/*************************************************************************
4
* Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
5
* All rights reserved. *
6
* *
7
* For the licensing terms see $ROOTSYS/LICENSE. *
8
* For the list of contributors see $ROOTSYS/README/CREDITS. *
9
*************************************************************************/
10
11
#include "
TGLQuadric.h
"
12
#include "TGLIncludes.h"
13
#include "
TError.h
"
14
15
/** \class TGLQuadric
16
\ingroup opengl
17
Wrapper class for GLU quadric shape drawing object. Lazy creation of
18
internal GLU raw quadric on first call to TGLQuadric::Get()
19
*/
20
21
22
////////////////////////////////////////////////////////////////////////////////
23
/// Construct quadric
24
25
TGLQuadric::TGLQuadric
() :
26
fQuad
(nullptr)
27
{
28
}
29
30
////////////////////////////////////////////////////////////////////////////////
31
/// Destroy quadric
32
33
TGLQuadric::~TGLQuadric
()
34
{
35
if
(
fQuad
) {
36
gluDeleteQuadric(
fQuad
);
37
}
38
}
39
40
////////////////////////////////////////////////////////////////////////////////
41
/// Get the internal raw GLU quadric object. Created on first call.
42
43
GLUquadric *
TGLQuadric::Get
()
44
{
45
if
(!
fQuad
) {
46
fQuad
= gluNewQuadric();
47
if
(!
fQuad
) {
48
Error
(
"TGLQuadric::Get"
,
"create failed"
);
49
}
else
{
50
gluQuadricOrientation(
fQuad
, (GLenum)GLU_OUTSIDE);
51
gluQuadricNormals(
fQuad
, (GLenum)GLU_SMOOTH);
52
}
53
}
54
return
fQuad
;
55
}
Error
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
TError.h
TGLQuadric.h
TGLQuadric::TGLQuadric
TGLQuadric()
Construct quadric.
Definition
TGLQuadric.cxx:25
TGLQuadric::Get
GLUquadric * Get()
Get the internal raw GLU quadric object. Created on first call.
Definition
TGLQuadric.cxx:43
TGLQuadric::~TGLQuadric
virtual ~TGLQuadric()
Destroy quadric.
Definition
TGLQuadric.cxx:33
TGLQuadric::fQuad
GLUquadric * fQuad
Definition
TGLQuadric.h:30
graf3d
gl
src
TGLQuadric.cxx
ROOTgit-r3/HEAD - Reference Guide Generated on
(GVA Time) using Doxygen 1.16.1