Panda3D
Loading...
Searching...
No Matches
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 */
17INLINE EggCurve::
18EggCurve(const std::string &name) : EggPrimitive(name) {
19 _subdiv = 0;
20 _type = CT_none;
21}
22
23/**
24 *
25 */
26INLINE EggCurve::
27EggCurve(const EggCurve &copy) :
28 EggPrimitive(copy),
29 _subdiv(copy._subdiv),
30 _type(copy._type)
31{
32}
33
34/**
35 *
36 */
37INLINE EggCurve &EggCurve::
38operator = (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 */
52INLINE void EggCurve::
53set_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 */
61INLINE int EggCurve::
62get_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 */
71INLINE void EggCurve::
72set_curve_type(EggCurve::CurveType type) {
73 _type = type;
74}
75
76/**
77 * Returns the indicated type of the curve.
78 */
79INLINE EggCurve::CurveType EggCurve::
80get_curve_type() const {
81 return _type;
82}
A parametric curve of some kind.
Definition eggCurve.h:24
void set_subdiv(int subdiv)
Sets the number of subdivisions that will be requested across the curve.
Definition eggCurve.I:53
void set_curve_type(CurveType type)
Sets the type of the curve.
Definition eggCurve.I:72
int get_subdiv() const
Returns the requested number of subdivisions, or 0 if no particular subdivisions have been requested.
Definition eggCurve.I:62
CurveType get_curve_type() const
Returns the indicated type of the curve.
Definition eggCurve.I:80
A base class for any of a number of kinds of geometry primitives: polygons, point lights,...