Panda3D
qtessInputEntry.I
1 // Filename: qtessInputEntry.I
2 // Created by: drose (13Oct03)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: QtessInputEntry::Copy Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE QtessInputEntry::
22 QtessInputEntry(const QtessInputEntry &copy) {
23  (*this) = copy;
24 }
25 
26 ////////////////////////////////////////////////////////////////////
27 // Function: QtessInputEntry::add_node_name
28 // Access: Public
29 // Description:
30 ////////////////////////////////////////////////////////////////////
31 INLINE void QtessInputEntry::
32 add_node_name(const string &name) {
33  _node_names.push_back(GlobPattern(name));
34 }
35 
36 ////////////////////////////////////////////////////////////////////
37 // Function: QtessInputEntry::set_importance
38 // Access: Public
39 // Description:
40 ////////////////////////////////////////////////////////////////////
41 INLINE void QtessInputEntry::
42 set_importance(double i) {
43  _importance = i;
44  _type = T_importance;
45 }
46 
47 ////////////////////////////////////////////////////////////////////
48 // Function: QtessInputEntry::set_match_uu
49 // Access: Public
50 // Description:
51 ////////////////////////////////////////////////////////////////////
52 INLINE void QtessInputEntry::
53 set_match_uu() {
54  _type = T_match_uu;
55  _constrain_u = NULL;
56 }
57 
58 ////////////////////////////////////////////////////////////////////
59 // Function: QtessInputEntry::set_match_vv
60 // Access: Public
61 // Description:
62 ////////////////////////////////////////////////////////////////////
63 INLINE void QtessInputEntry::
64 set_match_vv() {
65  _type = T_match_vv;
66  _constrain_v = NULL;
67 }
68 
69 ////////////////////////////////////////////////////////////////////
70 // Function: QtessInputEntry::set_match_uv
71 // Access: Public
72 // Description:
73 ////////////////////////////////////////////////////////////////////
74 INLINE void QtessInputEntry::
75 set_match_uv() {
76  _type = T_match_uv;
77  _constrain_u = NULL;
78 }
79 
80 ////////////////////////////////////////////////////////////////////
81 // Function: QtessInputEntry::set_match_vu
82 // Access: Public
83 // Description:
84 ////////////////////////////////////////////////////////////////////
85 INLINE void QtessInputEntry::
86 set_match_vu() {
87  _type = T_match_vu;
88  _constrain_v = NULL;
89 }
90 
91 ////////////////////////////////////////////////////////////////////
92 // Function: QtessInputEntry::set_min_u
93 // Access: Public
94 // Description:
95 ////////////////////////////////////////////////////////////////////
96 INLINE void QtessInputEntry::
97 set_min_u(int min_u) {
98  _type = T_min_u;
99  _num_u = min_u;
100 }
101 
102 ////////////////////////////////////////////////////////////////////
103 // Function: QtessInputEntry::set_min_v
104 // Access: Public
105 // Description:
106 ////////////////////////////////////////////////////////////////////
107 INLINE void QtessInputEntry::
108 set_min_v(int min_v) {
109  _type = T_min_v;
110  _num_v = min_v;
111 }
112 
113 ////////////////////////////////////////////////////////////////////
114 // Function: QtessInputEntry::set_undefined
115 // Access: Public
116 // Description:
117 ////////////////////////////////////////////////////////////////////
118 INLINE void QtessInputEntry::
119 set_undefined() {
120  _type = T_undefined;
121 }
122 
123 ////////////////////////////////////////////////////////////////////
124 // Function: QtessInputEntry::set_omit
125 // Access: Public
126 // Description:
127 ////////////////////////////////////////////////////////////////////
128 INLINE void QtessInputEntry::
129 set_omit() {
130  _type = T_omit;
131 }
132 
133 ////////////////////////////////////////////////////////////////////
134 // Function: QtessInputEntry::set_num_tris
135 // Access: Public
136 // Description:
137 ////////////////////////////////////////////////////////////////////
138 INLINE void QtessInputEntry::
139 set_num_tris(int nt) {
140  _num_tris = nt;
141  _type = T_num_tris;
142 }
143 
144 ////////////////////////////////////////////////////////////////////
145 // Function: QtessInputEntry::set_uv
146 // Access: Public
147 // Description:
148 ////////////////////////////////////////////////////////////////////
149 INLINE void QtessInputEntry::
150 set_uv(int u, int v) {
151  set_uv(u, v, NULL, 0);
152 }
153 
154 ////////////////////////////////////////////////////////////////////
155 // Function: QtessInputEntry::set_per_isoparam
156 // Access: Public
157 // Description:
158 ////////////////////////////////////////////////////////////////////
159 INLINE void QtessInputEntry::
160 set_per_isoparam(double pi) {
161  _per_isoparam = pi;
162  _type = T_per_isoparam;
163 }
164 
165 ////////////////////////////////////////////////////////////////////
166 // Function: QtessInputEntry::set_per_score
167 // Access: Public
168 // Description:
169 ////////////////////////////////////////////////////////////////////
170 INLINE void QtessInputEntry::
171 set_per_score(double pi) {
172  _per_isoparam = pi;
173  _type = T_per_score;
174 }
175 
176 ////////////////////////////////////////////////////////////////////
177 // Function: QtessInputEntry::get_num_surfaces
178 // Access: Public
179 // Description:
180 ////////////////////////////////////////////////////////////////////
181 INLINE int QtessInputEntry::
182 get_num_surfaces() const {
183  return _surfaces.size();
184 }
185 
186 
187 INLINE ostream &operator << (ostream &out, const QtessInputEntry &entry) {
188  entry.output(out);
189  return out;
190 }
191 
Stores one entry in the qtess input file.
This class can be used to test for string matches against standard Unix-shell filename globbing conve...
Definition: globPattern.h:37