ROOT
master
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
}
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
TError.h
Error
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition
TError.cxx:208
TGLQuadric.h
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
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
ROOT master - Reference Guide Generated on Wed Sep 24 2025 15:07:41 (GVA Time) using Doxygen 1.10.0