Panda3D
Loading...
Searching...
No Matches
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 */
17INLINE EggSurface::
18EggSurface(const std::string &name) : EggPrimitive(name) {
19 _u_subdiv = 0;
20 _v_subdiv = 0;
21}
22
23/**
24 *
25 */
26INLINE EggSurface::
27EggSurface(const EggSurface &copy) :
28 EggPrimitive(copy),
29 _u_subdiv(copy._u_subdiv),
30 _v_subdiv(copy._v_subdiv)
31{
32}
33
34/**
35 *
36 */
37INLINE EggSurface &EggSurface::
38operator = (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 */
52INLINE void EggSurface::
53set_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 */
61INLINE int EggSurface::
62get_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 */
72INLINE void EggSurface::
73set_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 */
81INLINE int EggSurface::
82get_v_subdiv() const {
83 return _v_subdiv;
84}
A base class for any of a number of kinds of geometry primitives: polygons, point lights,...
A parametric surface of some kind.
Definition eggSurface.h:24
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
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
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