Loading [MathJax]/extensions/tex2jax.js
ROOT
6.12/07
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
+
Namespaces
Namespace List
+
Namespace Members
+
All
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
w
x
+
Enumerations
a
e
f
g
m
p
t
w
y
+
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
w
+
All Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
f
+
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
+
File Members
+
All
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerations
c
e
f
i
l
m
p
r
u
x
+
Enumerator
a
c
d
e
f
g
h
i
k
l
n
o
p
r
s
v
w
+
Macros
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
graf3d
gl
src
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
ClassImp
(
TGLQuadric
);
22
23
////////////////////////////////////////////////////////////////////////////////
24
/// Construct quadric
25
26
TGLQuadric::TGLQuadric
() :
27
fQuad(0)
28
{
29
}
30
31
////////////////////////////////////////////////////////////////////////////////
32
/// Destroy quadric
33
34
TGLQuadric::~TGLQuadric
()
35
{
36
if
(
fQuad
) {
37
gluDeleteQuadric(
fQuad
);
38
}
39
}
40
41
////////////////////////////////////////////////////////////////////////////////
42
/// Get the internal raw GLU quadric object. Created on first call.
43
44
GLUquadric *
TGLQuadric::Get
()
45
{
46
if
(!
fQuad
) {
47
fQuad
= gluNewQuadric();
48
if
(!
fQuad
) {
49
Error
(
"TGLQuadric::Get"
,
"create failed"
);
50
}
else
{
51
gluQuadricOrientation(
fQuad
, (GLenum)GLU_OUTSIDE);
52
gluQuadricNormals(
fQuad
, (GLenum)GLU_SMOOTH);
53
}
54
}
55
return
fQuad
;
56
}
TGLQuadric::~TGLQuadric
virtual ~TGLQuadric()
Destroy quadric.
Definition:
TGLQuadric.cxx:34
TGLQuadric::Get
GLUquadric * Get()
Get the internal raw GLU quadric object. Created on first call.
Definition:
TGLQuadric.cxx:44
TGLQuadric
Wrapper class for GLU quadric shape drawing object.
Definition:
TGLQuadric.h:27
Error
void Error(const char *location, const char *msgfmt,...)
TGLIncludes.h
TError.h
TGLQuadric.h
TGLQuadric::TGLQuadric
TGLQuadric()
Construct quadric.
Definition:
TGLQuadric.cxx:26
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:359
TGLQuadric::fQuad
GLUquadric * fQuad
Definition:
TGLQuadric.h:30