Panda3D
Loading...
Searching...
No Matches
eggPoint.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 eggPoint.I
10 * @author drose
11 * @date 1999-12-15
12 */
13
14/**
15 *
16 */
17INLINE EggPoint::
18EggPoint(const std::string &name) :
19 EggPrimitive(name),
20 _flags(0),
21 _thick(1.0)
22{
23}
24
25/**
26 *
27 */
28INLINE EggPoint::
29EggPoint(const EggPoint &copy) :
30 EggPrimitive(copy),
31 _flags(copy._flags),
32 _thick(copy._thick)
33{
34}
35
36/**
37 *
38 */
39INLINE EggPoint &EggPoint::
40operator = (const EggPoint &copy) {
41 EggPrimitive::operator = (copy);
42 _flags = copy._flags;
43 _thick = copy._thick;
44 return *this;
45}
46
47/**
48 *
49 */
50INLINE bool EggPoint::
51has_thick() const {
52 return (_flags & F_has_thick) != 0;
53}
54
55/**
56 * Returns the thickness set on this particular point. If there is no
57 * thickness set, returns 1.0.
58 */
59INLINE double EggPoint::
60get_thick() const {
61 return _thick;
62}
63
64/**
65 *
66 */
67INLINE void EggPoint::
68set_thick(double thick) {
69 _thick = thick;
70 _flags |= F_has_thick;
71}
72
73/**
74 *
75 */
76INLINE void EggPoint::
77clear_thick() {
78 _thick = 1.0;
79 _flags &= ~F_has_thick;
80}
81
82/**
83 *
84 */
85INLINE bool EggPoint::
86has_perspective() const {
87 return (_flags & F_has_perspective) != 0;
88}
89
90/**
91 * Returns the perspective flag set on this particular point. If there is no
92 * perspective flag set, returns false.
93 */
94INLINE bool EggPoint::
95get_perspective() const {
96 return (_flags & F_perspective) != 0;
97}
98
99/**
100 *
101 */
102INLINE void EggPoint::
103set_perspective(bool perspective) {
104 if (perspective) {
105 _flags |= F_perspective;
106 } else {
107 _flags &= ~F_perspective;
108 }
109 _flags |= F_has_perspective;
110}
111
112/**
113 *
114 */
115INLINE void EggPoint::
116clear_perspective() {
117 _flags &= ~(F_has_perspective | F_perspective);
118}
A single point, or a collection of points as defined by a single <PointLight> entry.
Definition eggPoint.h:25
bool get_perspective() const
Returns the perspective flag set on this particular point.
Definition eggPoint.I:95
double get_thick() const
Returns the thickness set on this particular point.
Definition eggPoint.I:60
A base class for any of a number of kinds of geometry primitives: polygons, point lights,...