Panda3D
eggCurve.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 eggCurve.I
10  * @author drose
11  * @date 2000-02-15
12  */
13 
14 /**
15  *
16  */
17 INLINE EggCurve::
18 EggCurve(const std::string &name) : EggPrimitive(name) {
19  _subdiv = 0;
20  _type = CT_none;
21 }
22 
23 /**
24  *
25  */
26 INLINE EggCurve::
27 EggCurve(const EggCurve &copy) :
28  EggPrimitive(copy),
29  _subdiv(copy._subdiv),
30  _type(copy._type)
31 {
32 }
33 
34 /**
35  *
36  */
37 INLINE EggCurve &EggCurve::
38 operator = (const EggCurve &copy) {
39  EggPrimitive::operator = (copy);
40  _subdiv = copy._subdiv;
41  _type = copy._type;
42  return *this;
43 }
44 
45 
46 /**
47  * Sets the number of subdivisions that will be requested across the curve.
48  * (This doesn't necessary guarantee that this number of subdivisions will be
49  * made; it's just a hint to any curve renderer or quick tesselator.) Set the
50  * number to 0 to disable the hint.
51  */
52 INLINE void EggCurve::
53 set_subdiv(int subdiv) {
54  _subdiv = subdiv;
55 }
56 
57 /**
58  * Returns the requested number of subdivisions, or 0 if no particular
59  * subdivisions have been requested.
60  */
61 INLINE int EggCurve::
62 get_subdiv() const {
63  return _subdiv;
64 }
65 
66 
67 /**
68  * Sets the type of the curve. This is primarily used as a hint to any code
69  * that may need to deal with this curve.
70  */
71 INLINE void EggCurve::
72 set_curve_type(EggCurve::CurveType type) {
73  _type = type;
74 }
75 
76 /**
77  * Returns the indicated type of the curve.
78  */
79 INLINE EggCurve::CurveType EggCurve::
80 get_curve_type() const {
81  return _type;
82 }
A base class for any of a number of kinds of geometry primitives: polygons, point lights,...
Definition: eggPrimitive.h:47
CurveType get_curve_type() const
Returns the indicated type of the curve.
Definition: eggCurve.I:80
void set_curve_type(CurveType type)
Sets the type of the curve.
Definition: eggCurve.I:72
void set_subdiv(int subdiv)
Sets the number of subdivisions that will be requested across the curve.
Definition: eggCurve.I:53
int get_subdiv() const
Returns the requested number of subdivisions, or 0 if no particular subdivisions have been requested.
Definition: eggCurve.I:62
A parametric curve of some kind.
Definition: eggCurve.h:24