Panda3D
panda
src
egg
eggLine.I
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file eggLine.I
10
* @author drose
11
* @date 2003-10-14
12
*/
13
14
/**
15
*
16
*/
17
INLINE EggLine::
18
EggLine(
const
std::string &name) :
19
EggCompositePrimitive
(name),
20
_has_thick(false)
21
{
22
}
23
24
/**
25
*
26
*/
27
INLINE EggLine::
28
EggLine(
const
EggLine
©) :
29
EggCompositePrimitive
(copy),
30
_thick(copy._thick),
31
_has_thick(copy._has_thick)
32
{
33
}
34
35
/**
36
*
37
*/
38
INLINE
EggLine
&EggLine::
39
operator = (
const
EggLine
©) {
40
EggCompositePrimitive::operator = (copy);
41
_thick = copy._thick;
42
_has_thick = copy._has_thick;
43
return
*
this
;
44
}
45
46
/**
47
*
48
*/
49
INLINE
bool
EggLine::
50
has_thick()
const
{
51
return
_has_thick;
52
}
53
54
/**
55
* Returns the thickness set on this particular line. If there is no
56
* thickness set, returns 1.0.
57
*/
58
INLINE
double
EggLine::
59
get_thick
()
const
{
60
if
(has_thick()) {
61
return
_thick;
62
}
else
{
63
return
1.0;
64
}
65
}
66
67
/**
68
*
69
*/
70
INLINE
void
EggLine::
71
set_thick(
double
thick) {
72
_thick = thick;
73
_has_thick =
true
;
74
}
75
76
/**
77
*
78
*/
79
INLINE
void
EggLine::
80
clear_thick() {
81
_has_thick =
false
;
82
}
EggCompositePrimitive
The base class for primitives such as triangle strips and triangle fans, which include several compon...
Definition:
eggCompositePrimitive.h:26
EggLine::get_thick
double get_thick() const
Returns the thickness set on this particular line.
Definition:
eggLine.I:59
EggLine
A line segment, or a series of connected line segments, defined by a <Line> entry.
Definition:
eggLine.h:25
Generated on Sat Jan 11 2020 15:14:54 for Panda3D by
1.8.17