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