Panda3D

Loading...
Searching...
No Matches
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 */
17INLINE EggLine::
18EggLine(const std::string &name) :
19 EggCompositePrimitive(name),
20 _has_thick(false)
21{
22}
23
24/**
25 *
26 */
27INLINE EggLine::
28EggLine(const EggLine &copy) :
29 EggCompositePrimitive(copy),
30 _thick(copy._thick),
31 _has_thick(copy._has_thick)
32{
33}
34
35/**
36 *
37 */
38INLINE EggLine &EggLine::
39operator = (const EggLine &copy) {
40 EggCompositePrimitive::operator = (copy);
41 _thick = copy._thick;
42 _has_thick = copy._has_thick;
43 return *this;
44}
45
46/**
47 *
48 */
49INLINE bool EggLine::
50has_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 */
58INLINE 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 */
70INLINE void EggLine::
71set_thick(double thick) {
72 _thick = thick;
73 _has_thick = true;
74}
75
76/**
77 *
78 */
79INLINE void EggLine::
80clear_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
A line segment, or a series of connected line segments, defined by a <Line> entry.
Definition eggLine.h:25
EggLine::get_thick
double get_thick() const
Returns the thickness set on this particular line.
Definition eggLine.I:59