Debian Codegraph @

lib/database/src/so/nodes/nurbs/libnurbs/mapdesc.c++

raw symbols SCIP
1 /*
2 *
3 * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * Further, this software is distributed without any warranty that it is
16 * free of the rightful claim of any third person regarding infringement
17 * or the like. Any license provided herein, whether implied or
18 * otherwise, applies only to this software file. Patent licenses, if
19 * any, provided herein do not apply to combinations of this program with
20 * other software, or any other product whatsoever.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
27 * Mountain View, CA 94043, or:
28 *
29 * http://www.sgi.com
30 *
31 * For further information regarding this notice, see:
32 *
33 * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
34 *
35 */
36
37 /*
38 * mapdesc.c++ - $Revision: 1.2 $
39 * Derrick Burns - 1991
40 */
41
42 #include "glimports.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/glimports.h`/
43 #include "mystdio.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/mystdio.h`/
44 #include "myassert.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/myassert.h`/
45 #include "mystring.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/mystring.h`/
46 #include "mymath.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/mymath.h`/
47 #include "backend.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/backend.h`/
48 #include "nurbsconsts.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/nurbsconsts.h`/
49 #include "mapdesc.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/mapdesc.h`/
50
51 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!( long _type, int _israt, int _ncoords, Backendcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:42:9`!& b )
52 : backendcxx . . $ _SoNurbsMapdesc#backend.( b )
53 {
54 typecxx . . $ _SoNurbsMapdesc#type. = _type;
55 isrationalcxx . . $ _SoNurbsMapdesc#isrational. = _israt;
56 ncoordscxx . . $ _SoNurbsMapdesc#ncoords. = _ncoords;
57 hcoordscxx . . $ _SoNurbsMapdesc#hcoords. = _ncoords + (_israt ? 0 : 1 );
58 inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords. = _ncoords - (_israt ? 1 : 0 );
59 maskcxx . . $ _SoNurbsMapdesc#mask. = ((1<<(inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords.*2))-1);
60 nextcxx . . $ _SoNurbsMapdesc#next. = 0;
61
62 assertcxx . . $ `/usr/include/assert.h:50:10`!( hcoords <= MAXCOORDS );
63 assertcxx . . $ `/usr/include/assert.h:50:10`!( inhcoords >= 1 );
64
65 pixel_tolerancecxx . . $ _SoNurbsMapdesc#pixel_tolerance. = 1.0;
66 error_tolerancecxx . . $ _SoNurbsMapdesc#error_tolerance. = 1.0;
67 bbox_subdividingcxx . . $ _SoNurbsMapdesc#bbox_subdividing. = N_NOBBOXSUBDIVISIONcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:68:10`!;
68 culling_methodcxx . . $ _SoNurbsMapdesc#culling_method. = N_NOCULLINGcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:58:10`!;
69 sampling_methodcxx . . $ _SoNurbsMapdesc#sampling_method. = N_NOSAMPLINGcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:61:10`!;
70 clampfactorcxx . . $ _SoNurbsMapdesc#clampfactor. = N_NOCLAMPINGcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:51:10`!;
71 minsavingscxx . . $ _SoNurbsMapdesc#minsavings. = N_NOSAVINGSSUBDIVISIONcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:53:10`!;
72 s_stepscxx . . $ _SoNurbsMapdesc#s_steps. = 0.0;
73 t_stepscxx . . $ _SoNurbsMapdesc#t_steps. = 0.0;
74 maxratecxx . . $ _SoNurbsMapdesc#maxrate. = ( s_stepscxx . . $ _SoNurbsMapdesc#s_steps. < 0.0 ) ? 0.0 : s_stepscxx . . $ _SoNurbsMapdesc#s_steps.;
75 maxsratecxx . . $ _SoNurbsMapdesc#maxsrate. = ( s_stepscxx . . $ _SoNurbsMapdesc#s_steps. < 0.0 ) ? 0.0 : s_stepscxx . . $ _SoNurbsMapdesc#s_steps.;
76 maxtratecxx . . $ _SoNurbsMapdesc#maxtrate. = ( t_stepscxx . . $ _SoNurbsMapdesc#t_steps. < 0.0 ) ? 0.0 : t_stepscxx . . $ _SoNurbsMapdesc#t_steps.;
77 identifycxx . . $ _SoNurbsMapdesc#identify(bc40f754a10ca9a).( bmatcxx . . $ _SoNurbsMapdesc#bmat. );
78 identifycxx . . $ _SoNurbsMapdesc#identify(bc40f754a10ca9a).( cmatcxx . . $ _SoNurbsMapdesc#cmat. );
79 identifycxx . . $ _SoNurbsMapdesc#identify(bc40f754a10ca9a).( smatcxx . . $ _SoNurbsMapdesc#smat. );
80 for( int i = 0; i != inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords.; i++ )
81 bboxsizecxx . . $ _SoNurbsMapdesc#bboxsize.[i] = 1.0;
82 }
83
84 void
85 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::setBboxsizecxx . . $ _SoNurbsMapdesc#setBboxsize(e6881f009d13a851).( INREALcxx . . $ `lib/database/src/so/nodes/nurbs/head/types.h:46:9`! *mat )
86 {
87 for( int i = 0; i != inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords.; i++ )
88 bboxsizecxx . . $ _SoNurbsMapdesc#bboxsize.[i] = (REALcxx . . $ REAL#) mat[i];
89 }
90
91 void
92 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::identifycxx . . $ _SoNurbsMapdesc#identify(bc40f754a10ca9a).( Maxmatrixcxx . . $ Maxmatrix#& dest )
93 {
94 memset( dest, 0, sizeof( dest ) );
95 for( int i=0; i != hcoordscxx . . $ _SoNurbsMapdesc#hcoords.; i++ )
96 dest[i][i] = 1.0;
97 }
98
99 void
100 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::surfbboxcxx . . $ _SoNurbsMapdesc#surfbbox(438535bbc1afad64).( REALcxx . . $ REAL# bb[2][MAXCOORDScxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:55:9`!] )
101 {
102 backendcxx . . $ _SoNurbsMapdesc#backend..surfbboxcxx . . $ _SoNurbsBackend#surfbbox(bfc44e964680a29a).( typecxx . . $ _SoNurbsMapdesc#type., bb[0], bb[1] );
103 }
104
105 void
106 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::copycxx . . $ _SoNurbsMapdesc#copy(ec51dbfdbdd87644).( REALcxx . . $ REAL# dest[MAXCOORDScxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:55:9`!][MAXCOORDScxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:55:9`!], long n, INREALcxx . . $ `lib/database/src/so/nodes/nurbs/head/types.h:46:9`! *src,
107 long rstride, long cstride )
108 {
109 assertcxx . . $ `/usr/include/assert.h:50:10`!( n >= 0 );
110 for( int i=0; i != n; i++ )
111 for( int j=0; j != n; j++ )
112 dest[i][j] = src[i*rstride + j*cstride];
113 }
114
115 /*--------------------------------------------------------------------------
116 * copyPt - copy a homogeneous point
117 *--------------------------------------------------------------------------
118 */
119 void
120 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::copyPtcxx . . $ _SoNurbsMapdesc#copyPt(abb9d6b01b35f6ff).( REALcxx . . $ REAL# *d, REALcxx . . $ REAL# *s )
121 {
122 assertcxx . . $ `/usr/include/assert.h:50:10`!( hcoords > 0 );
123 switch( hcoordscxx . . $ _SoNurbsMapdesc#hcoords. ) {
124 case 4:
125 d[3] = s[3];
126 d[2] = s[2];
127 d[1] = s[1];
128 d[0] = s[0];
129 break;
130 case 3:
131 d[2] = s[2];
132 d[1] = s[1];
133 d[0] = s[0];
134 break;
135 case 2:
136 d[1] = s[1];
137 d[0] = s[0];
138 break;
139 case 1:
140 d[0] = s[0];
141 break;
142 case 5:
143 d[4] = s[4];
144 d[3] = s[3];
145 d[2] = s[2];
146 d[1] = s[1];
147 d[0] = s[0];
148 break;
149 default:
150 memcpy( d, s, hcoordscxx . . $ _SoNurbsMapdesc#hcoords. * sizeof( REALcxx . . $ REAL# ) );
151 break;
152 }
153 }
154
155 /*--------------------------------------------------------------------------
156 * sumPt - compute affine combination of two homogeneous points
157 *--------------------------------------------------------------------------
158 */
159 void
160 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::sumPtcxx . . $ _SoNurbsMapdesc#sumPt(bec051abf7057cf9).( REALcxx . . $ REAL# *dst, REALcxx . . $ REAL# *src1, REALcxx . . $ REAL# *src2, register REALcxx . . $ REAL# alpha, register REALcxx . . $ REAL# beta )
161 {
162 assertcxx . . $ `/usr/include/assert.h:50:10`!( hcoords > 0 );
163 switch( hcoordscxx . . $ _SoNurbsMapdesc#hcoords. ) {
164 case 4:
165 dst[3] = src1[3] * alpha + src2[3] * beta;
166 dst[2] = src1[2] * alpha + src2[2] * beta;
167 dst[1] = src1[1] * alpha + src2[1] * beta;
168 dst[0] = src1[0] * alpha + src2[0] * beta;
169 break;
170 case 3:
171 dst[2] = src1[2] * alpha + src2[2] * beta;
172 dst[1] = src1[1] * alpha + src2[1] * beta;
173 dst[0] = src1[0] * alpha + src2[0] * beta;
174 break;
175 case 2:
176 dst[1] = src1[1] * alpha + src2[1] * beta;
177 dst[0] = src1[0] * alpha + src2[0] * beta;
178 break;
179 case 1:
180 dst[0] = src1[0] * alpha + src2[0] * beta;
181 break;
182 case 5:
183 dst[4] = src1[4] * alpha + src2[4] * beta;
184 dst[3] = src1[3] * alpha + src2[3] * beta;
185 dst[2] = src1[2] * alpha + src2[2] * beta;
186 dst[1] = src1[1] * alpha + src2[1] * beta;
187 dst[0] = src1[0] * alpha + src2[0] * beta;
188 break;
189 default: {
190 for( int i = 0; i != hcoordscxx . . $ _SoNurbsMapdesc#hcoords.; i++ )
191 dst[i] = src1[i] * alpha + src2[i] * beta;
192 }
193 break;
194 }
195 }
196
197 /*--------------------------------------------------------------------------
198 * clipbits - compute bit-vector indicating point/window position
199 * of a (transformed) homogeneous point
200 *--------------------------------------------------------------------------
201 */
202 unsigned int
203 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::clipbitscxx . . $ _SoNurbsMapdesc#clipbits(57ccba94496e513d).( REALcxx . . $ REAL# *p )
204 {
205 assertcxx . . $ `/usr/include/assert.h:50:10`!( inhcoords >= 0 );
206 assertcxx . . $ `/usr/include/assert.h:50:10`!( inhcoords <= 3 );
207
208 register int nc = inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords.;
209 register REALcxx . . $ REAL# pw = p[nc];
210 register REALcxx . . $ REAL# nw = -pw;
211 register unsigned int bits = 0;
212
213 if( pw == 0.0 ) return maskcxx . . $ _SoNurbsMapdesc#mask.;
214
215 if( pw > 0.0 ) {
216 switch( nc ) {
217 case 3:
218 if( p[2] <= pw ) bits |= (1<<5);
219 if( p[2] >= nw ) bits |= (1<<4);
220 if( p[1] <= pw ) bits |= (1<<3);
221 if( p[1] >= nw ) bits |= (1<<2);
222 if( p[0] <= pw ) bits |= (1<<1);
223 if( p[0] >= nw ) bits |= (1<<0);
224 return bits;
225 case 2:
226 if( p[1] <= pw ) bits |= (1<<3);
227 if( p[1] >= nw ) bits |= (1<<2);
228 if( p[0] <= pw ) bits |= (1<<1);
229 if( p[0] >= nw ) bits |= (1<<0);
230 return bits;
231 case 1:
232 if( p[0] <= pw ) bits |= (1<<1);
233 if( p[0] >= nw ) bits |= (1<<0);
234 return bits;
235 default: {
236 int bit = 1;
237 for( int i=0; i<nc; i++ ) {
238 if( p[i] >= nw ) bits |= bit;
239 bit <<= 1;
240 if( p[i] <= pw ) bits |= bit;
241 bit <<= 1;
242 }
243 abortcxx . . $ abort(8df32a62017fbbf6).();
244 break;
245 }
246 }
247 } else {
248 switch( nc ) {
249 case 3:
250 if( p[2] <= nw ) bits |= (1<<5);
251 if( p[2] >= pw ) bits |= (1<<4);
252 if( p[1] <= nw ) bits |= (1<<3);
253 if( p[1] >= pw ) bits |= (1<<2);
254 if( p[0] <= nw ) bits |= (1<<1);
255 if( p[0] >= pw ) bits |= (1<<0);
256 return bits;
257 case 2:
258 if( p[1] <= nw ) bits |= (1<<3);
259 if( p[1] >= pw ) bits |= (1<<2);
260 if( p[0] <= nw ) bits |= (1<<1);
261 if( p[0] >= pw ) bits |= (1<<0);
262 return bits;
263 case 1:
264 if( p[0] <= nw ) bits |= (1<<1);
265 if( p[0] >= pw ) bits |= (1<<0);
266 return bits;
267 default: {
268 int bit = 1;
269 for( int i=0; i<nc; i++ ) {
270 if( p[i] >= pw ) bits |= bit;
271 bit <<= 1;
272 if( p[i] <= nw ) bits |= bit;
273 bit <<= 1;
274 }
275 abortcxx . . $ abort(8df32a62017fbbf6).();
276 break;
277 }
278 }
279 }
280 return bits;
281 }
282
283 /*--------------------------------------------------------------------------
284 * xformRational - transform a homogeneous point
285 *--------------------------------------------------------------------------
286 */
287 void
288 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::xformRationalcxx . . $ _SoNurbsMapdesc#xformRational(37b7709c42a14b81).( Maxmatrixcxx . . $ Maxmatrix# mat, REALcxx . . $ REAL# *d, REALcxx . . $ REAL# *s )
289 {
290 assertcxx . . $ `/usr/include/assert.h:50:10`!( hcoords >= 0 );
291
292 if( hcoordscxx . . $ _SoNurbsMapdesc#hcoords. == 3 ) {
293 REALcxx . . $ REAL# x = s[0];
294 REALcxx . . $ REAL# y = s[1];
295 REALcxx . . $ REAL# z = s[2];
296 d[0] = x*mat[0][0]+y*mat[1][0]+z*mat[2][0];
297 d[1] = x*mat[0][1]+y*mat[1][1]+z*mat[2][1];
298 d[2] = x*mat[0][2]+y*mat[1][2]+z*mat[2][2];
299 } else if( hcoordscxx . . $ _SoNurbsMapdesc#hcoords. == 4 ) {
300 REALcxx . . $ REAL# x = s[0];
301 REALcxx . . $ REAL# y = s[1];
302 REALcxx . . $ REAL# z = s[2];
303 REALcxx . . $ REAL# w = s[3];
304 d[0] = x*mat[0][0]+y*mat[1][0]+z*mat[2][0]+w*mat[3][0];
305 d[1] = x*mat[0][1]+y*mat[1][1]+z*mat[2][1]+w*mat[3][1];
306 d[2] = x*mat[0][2]+y*mat[1][2]+z*mat[2][2]+w*mat[3][2];
307 d[3] = x*mat[0][3]+y*mat[1][3]+z*mat[2][3]+w*mat[3][3];
308 } else {
309 for( int i=0; i != hcoordscxx . . $ _SoNurbsMapdesc#hcoords.; i++ ) {
310 d[i] = 0;
311 for( int j = 0; j != hcoordscxx . . $ _SoNurbsMapdesc#hcoords.; j++ )
312 d[i] += s[j] * mat[j][i];
313 }
314 }
315 }
316
317 /*--------------------------------------------------------------------------
318 * xformNonrational - transform a inhomogeneous point to a homogeneous point
319 *--------------------------------------------------------------------------
320 */
321 void
322 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::xformNonrationalcxx . . $ _SoNurbsMapdesc#xformNonrational(37b7709c42a14b81).( Maxmatrixcxx . . $ Maxmatrix# mat, REALcxx . . $ REAL# *d, REALcxx . . $ REAL# *s )
323 {
324 if( inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords. == 2 ) {
325 REALcxx . . $ REAL# x = s[0];
326 REALcxx . . $ REAL# y = s[1];
327 d[0] = x*mat[0][0]+y*mat[1][0]+mat[2][0];
328 d[1] = x*mat[0][1]+y*mat[1][1]+mat[2][1];
329 d[2] = x*mat[0][2]+y*mat[1][2]+mat[2][2];
330 } else if( inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords. == 3 ) {
331 REALcxx . . $ REAL# x = s[0];
332 REALcxx . . $ REAL# y = s[1];
333 REALcxx . . $ REAL# z = s[2];
334 d[0] = x*mat[0][0]+y*mat[1][0]+z*mat[2][0]+mat[3][0];
335 d[1] = x*mat[0][1]+y*mat[1][1]+z*mat[2][1]+mat[3][1];
336 d[2] = x*mat[0][2]+y*mat[1][2]+z*mat[2][2]+mat[3][2];
337 d[3] = x*mat[0][3]+y*mat[1][3]+z*mat[2][3]+mat[3][3];
338 } else {
339 assertcxx . . $ `/usr/include/assert.h:50:10`!( inhcoords >= 0 );
340 for( int i=0; i != hcoordscxx . . $ _SoNurbsMapdesc#hcoords.; i++ ) {
341 d[i] = mat[inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords.][i];
342 for( int j = 0; j < inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords.; j++ )
343 d[i] += s[j] * mat[j][i];
344 }
345 }
346 }
347
348 /*--------------------------------------------------------------------------
349 * xformAndCullCheck - transform a set of points that may be EITHER
350 * homogeneous or inhomogeneous depending on the map description and
351 * check if they are either completely inside, completely outside,
352 * or intersecting the viewing frustrum.
353 *--------------------------------------------------------------------------
354 */
355 int
356 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::xformAndCullCheckcxx . . $ _SoNurbsMapdesc#xformAndCullCheck(d6111272ddfbbcd2).(
357 REALcxx . . $ REAL# *pts, int uorder, int ustride, int vorder, int vstride )
358 {
359 assertcxx . . $ `/usr/include/assert.h:50:10`!( uorder > 0 );
360 assertcxx . . $ `/usr/include/assert.h:50:10`!( vorder > 0 );
361
362 unsigned int inbits = maskcxx . . $ _SoNurbsMapdesc#mask.;
363 unsigned int outbits = 0;
364
365 REALcxx . . $ REAL# *p = pts;
366 for( REALcxx . . $ REAL# *pend = p + uorder * ustride; p != pend; p += ustride ) {
367 REALcxx . . $ REAL# *q = p;
368 for( REALcxx . . $ REAL# *qend = q + vorder * vstride; q != qend; q += vstride ) {
369 REALcxx . . $ REAL# cpts[MAXCOORDScxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:55:9`!];
370 xformCullingcxx . . $ _SoNurbsMapdesc#xformCulling(abb9d6b01b35f6ff).( cpts, q );
371 unsigned int bits = clipbitscxx . . $ _SoNurbsMapdesc#clipbits(57ccba94496e513d).( cpts );
372 outbits |= bits;
373 inbits &= bits;
374 if( ( outbits == maskcxx . . $ _SoNurbsMapdesc#mask. ) && ( inbits != maskcxx . . $ _SoNurbsMapdesc#mask. ) ) return CULL_ACCEPTcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:49:9`!;
375 }
376 }
377
378 if( outbits != maskcxx . . $ _SoNurbsMapdesc#mask. ) {
379 return CULL_TRIVIAL_REJECTcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:47:9`!;
380 } else if( inbits == maskcxx . . $ _SoNurbsMapdesc#mask. ) {
381 return CULL_TRIVIAL_ACCEPTcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:48:9`!;
382 } else {
383 return CULL_ACCEPTcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:49:9`!;
384 }
385 }
386
387 /*--------------------------------------------------------------------------
388 * cullCheck - check if a set of homogeneous transformed points are
389 * either completely inside, completely outside,
390 * or intersecting the viewing frustrum.
391 *--------------------------------------------------------------------------
392 */
393 int
394 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::cullCheckcxx . . $ _SoNurbsMapdesc#cullCheck(d6111272ddfbbcd2).( REALcxx . . $ REAL# *pts, int uorder, int ustride, int vorder, int vstride )
395 {
396 unsigned int inbits = maskcxx . . $ _SoNurbsMapdesc#mask.;
397 unsigned int outbits = 0;
398
399 REALcxx . . $ REAL# *p = pts;
400 for( REALcxx . . $ REAL# *pend = p + uorder * ustride; p != pend; p += ustride ) {
401 REALcxx . . $ REAL# *q = p;
402 for( REALcxx . . $ REAL# *qend = q + vorder * vstride; q != qend; q += vstride ) {
403 unsigned int bits = clipbitscxx . . $ _SoNurbsMapdesc#clipbits(57ccba94496e513d).( q );
404 outbits |= bits;
405 inbits &= bits;
406 if( ( outbits == maskcxx . . $ _SoNurbsMapdesc#mask. ) && ( inbits != maskcxx . . $ _SoNurbsMapdesc#mask. ) ) return CULL_ACCEPTcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:49:9`!;
407 }
408 }
409
410 if( outbits != maskcxx . . $ _SoNurbsMapdesc#mask. ) {
411 return CULL_TRIVIAL_REJECTcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:47:9`!;
412 } else if( inbits == maskcxx . . $ _SoNurbsMapdesc#mask. ) {
413 return CULL_TRIVIAL_ACCEPTcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:48:9`!;
414 } else {
415 return CULL_ACCEPTcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:49:9`!;
416 }
417 }
418
419 /*--------------------------------------------------------------------------
420 * cullCheck - check if a set of homogeneous transformed points are
421 * either completely inside, completely outside,
422 * or intersecting the viewing frustrum.
423 *--------------------------------------------------------------------------
424 */
425 int
426 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::cullCheckcxx . . $ _SoNurbsMapdesc#cullCheck(57c7a46ccc04de94).( REALcxx . . $ REAL# *pts, int order, int stride )
427 {
428 unsigned int inbits = maskcxx . . $ _SoNurbsMapdesc#mask.;
429 unsigned int outbits = 0;
430
431 REALcxx . . $ REAL# *p = pts;
432 for( REALcxx . . $ REAL# *pend = p + order * stride; p != pend; p += stride ) {
433 unsigned int bits = clipbitscxx . . $ _SoNurbsMapdesc#clipbits(57ccba94496e513d).( p );
434 outbits |= bits;
435 inbits &= bits;
436 if( ( outbits == maskcxx . . $ _SoNurbsMapdesc#mask. ) && ( inbits != maskcxx . . $ _SoNurbsMapdesc#mask. ) ) return CULL_ACCEPTcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:49:9`!;
437 }
438
439 if( outbits != maskcxx . . $ _SoNurbsMapdesc#mask. ) {
440 return CULL_TRIVIAL_REJECTcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:47:9`!;
441 } else if( inbits == maskcxx . . $ _SoNurbsMapdesc#mask. ) {
442 return CULL_TRIVIAL_ACCEPTcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:48:9`!;
443 } else {
444 return CULL_ACCEPTcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:49:9`!;
445 }
446 }
447
448 /*--------------------------------------------------------------------------
449 * xformSampling - transform a set of points that may be EITHER
450 * homogeneous or inhomogeneous depending on the map description
451 * into sampling space
452 *--------------------------------------------------------------------------
453 */
454 void
455 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::xformSamplingcxx . . $ _SoNurbsMapdesc#xformSampling(951376757c528743).( REALcxx . . $ REAL# *pts, int order, int stride, REALcxx . . $ REAL# *sp, int outstride )
456 {
457 xformMatcxx . . $ _SoNurbsMapdesc#xformMat(9e864bc7ac83c287).( smatcxx . . $ _SoNurbsMapdesc#smat., pts, order, stride, sp, outstride );
458 }
459
460 void
461 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::xformBoundingcxx . . $ _SoNurbsMapdesc#xformBounding(951376757c528743).( REALcxx . . $ REAL# *pts, int order, int stride, REALcxx . . $ REAL# *sp, int outstride )
462 {
463 xformMatcxx . . $ _SoNurbsMapdesc#xformMat(9e864bc7ac83c287).( bmatcxx . . $ _SoNurbsMapdesc#bmat., pts, order, stride, sp, outstride );
464 }
465
466 /*--------------------------------------------------------------------------
467 * xformCulling - transform a set of points that may be EITHER
468 * homogeneous or inhomogeneous depending on the map description
469 * into culling space
470 *--------------------------------------------------------------------------
471 */
472 void
473 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::xformCullingcxx . . $ _SoNurbsMapdesc#xformCulling(951376757c528743).( REALcxx . . $ REAL# *pts, int order, int stride, REALcxx . . $ REAL# *cp, int outstride )
474 {
475 xformMatcxx . . $ _SoNurbsMapdesc#xformMat(9e864bc7ac83c287).( cmatcxx . . $ _SoNurbsMapdesc#cmat., pts, order, stride, cp, outstride );
476 }
477
478 /*--------------------------------------------------------------------------
479 * xformCulling - transform a set of points that may be EITHER
480 * homogeneous or inhomogeneous depending on the map description
481 * into culling space
482 *--------------------------------------------------------------------------
483 */
484 void
485 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::xformCullingcxx . . $ _SoNurbsMapdesc#xformCulling(4b4b04bf5d002b6a).( REALcxx . . $ REAL# *pts,
486 int uorder, int ustride,
487 int vorder, int vstride,
488 REALcxx . . $ REAL# *cp, int outustride, int outvstride )
489 {
490 xformMatcxx . . $ _SoNurbsMapdesc#xformMat(17a200996480cb44).( cmatcxx . . $ _SoNurbsMapdesc#cmat., pts, uorder, ustride, vorder, vstride, cp, outustride, outvstride );
491 }
492
493 /*--------------------------------------------------------------------------
494 * xformSampling - transform a set of points that may be EITHER
495 * homogeneous or inhomogeneous depending on the map description
496 * into sampling space
497 *--------------------------------------------------------------------------
498 */
499 void
500 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::xformSamplingcxx . . $ _SoNurbsMapdesc#xformSampling(4b4b04bf5d002b6a).( REALcxx . . $ REAL# *pts,
501 int uorder, int ustride,
502 int vorder, int vstride,
503 REALcxx . . $ REAL# *sp, int outustride, int outvstride )
504 {
505 xformMatcxx . . $ _SoNurbsMapdesc#xformMat(17a200996480cb44).( smatcxx . . $ _SoNurbsMapdesc#smat., pts, uorder, ustride, vorder, vstride, sp, outustride, outvstride );
506 }
507
508 void
509 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::xformBoundingcxx . . $ _SoNurbsMapdesc#xformBounding(4b4b04bf5d002b6a).( REALcxx . . $ REAL# *pts,
510 int uorder, int ustride,
511 int vorder, int vstride,
512 REALcxx . . $ REAL# *sp, int outustride, int outvstride )
513 {
514 xformMatcxx . . $ _SoNurbsMapdesc#xformMat(17a200996480cb44).( bmatcxx . . $ _SoNurbsMapdesc#bmat., pts, uorder, ustride, vorder, vstride, sp, outustride, outvstride );
515 }
516
517 void
518 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::xformMatcxx . . $ _SoNurbsMapdesc#xformMat(9e864bc7ac83c287).(
519 Maxmatrixcxx . . $ Maxmatrix# mat,
520 REALcxx . . $ REAL# * pts,
521 int order,
522 int stride,
523 REALcxx . . $ REAL# * cp,
524 int outstride )
525 {
526 if( isrationalcxx . . $ _SoNurbsMapdesc#isrational. ) {
527 REALcxx . . $ REAL# *pend = pts + order * stride;
528 for( REALcxx . . $ REAL# *p = pts ; p != pend; p += stride ) {
529 xformRationalcxx . . $ _SoNurbsMapdesc#xformRational(37b7709c42a14b81).( mat, cp, p );
530 cp += outstride;
531 }
532 } else {
533 REALcxx . . $ REAL# *pend = pts + order * stride;
534 for( REALcxx . . $ REAL# *p = pts ; p != pend; p += stride ) {
535 xformNonrationalcxx . . $ _SoNurbsMapdesc#xformNonrational(37b7709c42a14b81).( mat, cp, p );
536 cp += outstride;
537 }
538 }
539 }
540
541 void
542 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::xformMatcxx . . $ _SoNurbsMapdesc#xformMat(17a200996480cb44).( Maxmatrixcxx . . $ Maxmatrix# mat, REALcxx . . $ REAL# *pts,
543 int uorder, int ustride,
544 int vorder, int vstride,
545 REALcxx . . $ REAL# *cp, int outustride, int outvstride )
546 {
547 if( isrationalcxx . . $ _SoNurbsMapdesc#isrational. ) {
548 REALcxx . . $ REAL# *pend = pts + uorder * ustride;
549 for( REALcxx . . $ REAL# *p = pts ; p != pend; p += ustride ) {
550 REALcxx . . $ REAL# *cpts2 = cp;
551 REALcxx . . $ REAL# *qend = p + vorder * vstride;
552 for( REALcxx . . $ REAL# *q = p; q != qend; q += vstride ) {
553 xformRationalcxx . . $ _SoNurbsMapdesc#xformRational(37b7709c42a14b81).( mat, cpts2, q );
554 cpts2 += outvstride;
555 }
556 cp += outustride;
557 }
558 } else {
559 REALcxx . . $ REAL# *pend = pts + uorder * ustride;
560 for( REALcxx . . $ REAL# *p = pts ; p != pend; p += ustride ) {
561 REALcxx . . $ REAL# *cpts2 = cp;
562 REALcxx . . $ REAL# *qend = p + vorder * vstride;
563 for( REALcxx . . $ REAL# *q = p; q != qend; q += vstride ) {
564 xformNonrationalcxx . . $ _SoNurbsMapdesc#xformNonrational(37b7709c42a14b81).( mat, cpts2, q );
565 cpts2 += outvstride;
566 }
567 cp += outustride;
568 }
569 }
570 }
571
572 /*--------------------------------------------------------------------------
573 * subdivide - subdivide a curve along an isoparametric line
574 *--------------------------------------------------------------------------
575 */
576
577 void
578 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::subdividecxx . . $ _SoNurbsMapdesc#subdivide(572a8b0178c92b8).( REALcxx . . $ REAL# *src, REALcxx . . $ REAL# *dst, REALcxx . . $ REAL# v, int stride, int order )
579 {
580 REALcxx . . $ REAL# mv = 1.0 - v;
581
582 for( REALcxx . . $ REAL# *send=src+stride*order; src!=send; send-=stride, dst+=stride ) {
583 copyPtcxx . . $ _SoNurbsMapdesc#copyPt(abb9d6b01b35f6ff).( dst, src );
584 REALcxx . . $ REAL# *qpnt = src + stride;
585 for( REALcxx . . $ REAL# *qp=src; qpnt!=send; qp=qpnt, qpnt+=stride )
586 sumPtcxx . . $ _SoNurbsMapdesc#sumPt(bec051abf7057cf9).( qp, qp, qpnt, mv, v );
587 }
588 }
589
590 /*--------------------------------------------------------------------------
591 * subdivide - subdivide a patch along an isoparametric line
592 *--------------------------------------------------------------------------
593 */
594
595 void
596 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::subdividecxx . . $ _SoNurbsMapdesc#subdivide(f395b28490ba176d).( REALcxx . . $ REAL# *src, REALcxx . . $ REAL# *dst, REALcxx . . $ REAL# v,
597 int so, int ss, int to, int ts )
598 {
599 REALcxx . . $ REAL# mv = 1.0 - v;
600
601 for( REALcxx . . $ REAL# *slast = src+ss*so; src != slast; src += ss, dst += ss ) {
602 REALcxx . . $ REAL# *sp = src;
603 REALcxx . . $ REAL# *dp = dst;
604 for( REALcxx . . $ REAL# *send = src+ts*to; sp != send; send -= ts, dp += ts ) {
605 copyPtcxx . . $ _SoNurbsMapdesc#copyPt(abb9d6b01b35f6ff).( dp, sp );
606 REALcxx . . $ REAL# *qp = sp;
607 for( REALcxx . . $ REAL# *qpnt = sp+ts; qpnt != send; qp = qpnt, qpnt += ts )
608 sumPtcxx . . $ _SoNurbsMapdesc#sumPt(bec051abf7057cf9).( qp, qp, qpnt, mv, v );
609 }
610 }
611 }
612
613
614 #define signcxx . . $ `lib/database/src/so/nodes/nurbs/libnurbs/mapdesc.c++:614:9`!(x) ((x > 0) ? 1 : ((x < 0.0) ? -1 : 0))
615
616 /*--------------------------------------------------------------------------
617 * project - project a set of homogeneous coordinates into inhomogeneous ones
618 *--------------------------------------------------------------------------
619 */
620 int
621 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::projectcxx . . $ _SoNurbsMapdesc#project(83cec47616990293).( REALcxx . . $ REAL# *src, int rstride, int cstride,
622 REALcxx . . $ REAL# *dest, int trstride, int tcstride,
623 int nrows, int ncols )
624 {
625 int s = signcxx . . $ `lib/database/src/so/nodes/nurbs/libnurbs/mapdesc.c++:614:9`!( src[inhcoords] );
626 REALcxx . . $ REAL# *rlast = src + nrows * rstride;
627 REALcxx . . $ REAL# *trptr = dest;
628 for( REALcxx . . $ REAL# *rptr=src; rptr != rlast; rptr+=rstride, trptr+=trstride ) {
629 REALcxx . . $ REAL# *clast = rptr + ncols * cstride;
630 REALcxx . . $ REAL# *tcptr = trptr;
631 for( REALcxx . . $ REAL# *cptr = rptr; cptr != clast; cptr+=cstride, tcptr+=tcstride ) {
632 REALcxx . . $ REAL# *coordlast = cptr + inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords.;
633 if( signcxx . . $ `lib/database/src/so/nodes/nurbs/libnurbs/mapdesc.c++:614:9`!( *coordlast ) != s ) return 0;
634 REALcxx . . $ REAL# *tcoord = tcptr;
635 for( REALcxx . . $ REAL# *coord = cptr; coord != coordlast; coord++, tcoord++ ) {
636 *tcoord = *coord / *coordlast;
637 }
638 }
639 }
640 return 1;
641 }
642
643 /*--------------------------------------------------------------------------
644 * project - project a set of homogeneous coordinates into inhomogeneous ones
645 *--------------------------------------------------------------------------
646 */
647 int
648 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::projectcxx . . $ _SoNurbsMapdesc#project(1ed58124883f6187).( REALcxx . . $ REAL# *src, int stride, REALcxx . . $ REAL# *dest, int tstride, int ncols )
649 {
650 int s = signcxx . . $ `lib/database/src/so/nodes/nurbs/libnurbs/mapdesc.c++:614:9`!( src[inhcoords] );
651
652 REALcxx . . $ REAL# *clast = src + ncols * stride;
653 for( REALcxx . . $ REAL# *cptr = src, *tcptr = dest; cptr != clast; cptr+=stride, tcptr+=tstride ) {
654 REALcxx . . $ REAL# *coordlast = cptr + inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords.;
655 if( signcxx . . $ `lib/database/src/so/nodes/nurbs/libnurbs/mapdesc.c++:614:9`!( *coordlast ) != s ) return 0;
656 for( REALcxx . . $ REAL# *coord = cptr, *tcoord = tcptr; coord != coordlast; coord++, tcoord++ )
657 *tcoord = *coord / *coordlast;
658 }
659
660 return 1;
661 }
662
663 int
664 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::bboxTooBigcxx . . $ _SoNurbsMapdesc#bboxTooBig(b19a00112729516a).(
665 REALcxx . . $ REAL# *p,
666 int rstride,
667 int cstride,
668 int nrows,
669 int ncols,
670 REALcxx . . $ REAL# bb[2][MAXCOORDScxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:55:9`!] )
671 {
672 REALcxx . . $ REAL# bbpts[MAXORDERcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:52:9`!][MAXORDERcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:52:9`!][MAXCOORDScxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:55:9`!];
673 const int trstride = sizeof(bbpts[0]) / sizeof(REALcxx . . $ REAL#);
674 const int tcstride = sizeof(bbpts[0][0]) / sizeof(REALcxx . . $ REAL#);
675
676 // points have been transformed, therefore they are homogeneous
677 // project points
678 int val = projectcxx . . $ _SoNurbsMapdesc#project(83cec47616990293).( p, rstride, cstride,
679 &bbpts[0][0][0], trstride, tcstride, nrows, ncols );
680 if( val == 0 ) return -1;
681
682 // compute bounding box
683 bboxcxx . . $ _SoNurbsMapdesc#bbox(865f70e3002c8d4d).( bb, &bbpts[0][0][0], trstride, tcstride, nrows, ncols );
684
685 // find out if bounding box can't fit in unit cube
686 if( bbox_subdividingcxx . . $ _SoNurbsMapdesc#bbox_subdividing. == N_BBOXROUNDcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:70:10`! ) {
687 for( int k=0; k != inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords.; k++ )
688 if( ceilf(bb[1][k]) - floorf(bb[0][k]) > bboxsizecxx . . $ _SoNurbsMapdesc#bboxsize.[k] ) return 1;
689 } else {
690 for( int k=0; k != inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords.; k++ )
691 if( bb[1][k] - bb[0][k] > bboxsizecxx . . $ _SoNurbsMapdesc#bboxsize.[k] ) return 1;
692 }
693 return 0;
694 }
695
696 void
697 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::bboxcxx . . $ _SoNurbsMapdesc#bbox(865f70e3002c8d4d).(
698 REALcxx . . $ REAL# bb[2][MAXCOORDScxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:55:9`!],
699 REALcxx . . $ REAL# *p,
700 int rstride,
701 int cstride,
702 int nrows,
703 int ncols )
704 {
705 int k;
706 for( k=0; k != inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords.; k++ )
707 bb[0][k] = bb[1][k] = p[k];
708
709 int i;
710 for( i=0; i != nrows; i++ )
711 for( int j=0; j != ncols; j++ )
712 for( k=0; k != inhcoordscxx . . $ _SoNurbsMapdesc#inhcoords.; k++ ) {
713 REALcxx . . $ REAL# x = p[i*rstride + j*cstride + k];
714 if( x < bb[0][k] ) bb[0][k] = x;
715 else if( x > bb[1][k] ) bb[1][k] = x;
716 }
717 }
718
719 /*--------------------------------------------------------------------------
720 * calcVelocityRational - calculate upper bound on first partial derivative
721 * of a homogeneous set of points and bounds on each row of points.
722 *--------------------------------------------------------------------------
723 */
724 REALcxx . . $ REAL#
725 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::calcVelocityRationalcxx . . $ _SoNurbsMapdesc#calcVelocityRational(4c1d67ef81991b02).( REALcxx . . $ REAL# *p, int stride, int ncols )
726 {
727 REALcxx . . $ REAL# tmp[MAXORDERcxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:52:9`!][MAXCOORDScxx . . $ `lib/database/src/so/nodes/nurbs/head/defines.h:55:9`!];
728
729 assertcxx . . $ `/usr/include/assert.h:50:10`!( ncols <= MAXORDER );
730
731 const int tstride = sizeof(tmp[0]) / sizeof(REALcxx . . $ REAL#);
732
733 if( projectcxx . . $ _SoNurbsMapdesc#project(1ed58124883f6187).( p, stride, &tmp[0][0], tstride, ncols ) ) {
734 return calcPartialVelocitycxx . . $ _SoNurbsMapdesc#calcPartialVelocity(faee7676d55665a1).( &tmp[0][0], tstride, ncols, 1, 1.0 );
735 } else { /* XXX */
736 return calcPartialVelocitycxx . . $ _SoNurbsMapdesc#calcPartialVelocity(faee7676d55665a1).( &tmp[0][0], tstride, ncols, 1, 1.0 );
737 }
738 }
739
740 /*--------------------------------------------------------------------------
741 * calcVelocityNonrational - calculate upper bound on first partial
742 * derivative of a inhomogeneous set of points.
743 *--------------------------------------------------------------------------
744 */
745 REALcxx . . $ REAL#
746 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::calcVelocityNonrationalcxx . . $ _SoNurbsMapdesc#calcVelocityNonrational(4c1d67ef81991b02).( REALcxx . . $ REAL# *pts, int stride, int ncols )
747 {
748 return calcPartialVelocitycxx . . $ _SoNurbsMapdesc#calcPartialVelocity(faee7676d55665a1).( pts, stride, ncols, 1, 1.0 );
749 }
750
751 int
752 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::isPropertycxx . . $ _SoNurbsMapdesc#isProperty(a9e4e82268fd7bfa).( long property )
753 {
754 switch ( property ) {
755 case N_PIXEL_TOLERANCEcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:93:9`!:
756 case N_ERROR_TOLERANCEcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:94:9`!:
757 case N_CULLINGcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:57:9`!:
758 case N_BBOX_SUBDIVIDINGcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:67:9`!:
759 case N_S_STEPScxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:103:9`!:
760 case N_T_STEPScxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:104:9`!:
761 case N_SAMPLINGMETHODcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:60:9`!:
762 case N_CLAMPFACTORcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:50:9`!:
763 case N_MINSAVINGScxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:52:9`!:
764 return 1;
765 default:
766 return 0;
767 }
768 }
769
770 REALcxx . . $ REAL#
771 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::getPropertycxx . . $ _SoNurbsMapdesc#getProperty(ee41e91a4ea7c917).( long property )
772 {
773 switch ( property ) {
774 case N_PIXEL_TOLERANCEcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:93:9`!:
775 return pixel_tolerancecxx . . $ _SoNurbsMapdesc#pixel_tolerance.;
776 case N_ERROR_TOLERANCEcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:94:9`!:
777 return error_tolerancecxx . . $ _SoNurbsMapdesc#error_tolerance.;
778 case N_CULLINGcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:57:9`!:
779 return culling_methodcxx . . $ _SoNurbsMapdesc#culling_method.;
780 case N_BBOX_SUBDIVIDINGcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:67:9`!:
781 return bbox_subdividingcxx . . $ _SoNurbsMapdesc#bbox_subdividing.;
782 case N_S_STEPScxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:103:9`!:
783 return s_stepscxx . . $ _SoNurbsMapdesc#s_steps.;
784 case N_T_STEPScxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:104:9`!:
785 return t_stepscxx . . $ _SoNurbsMapdesc#t_steps.;
786 case N_SAMPLINGMETHODcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:60:9`!:
787 return sampling_methodcxx . . $ _SoNurbsMapdesc#sampling_method.;
788 case N_CLAMPFACTORcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:50:9`!:
789 return clampfactorcxx . . $ _SoNurbsMapdesc#clampfactor.;
790 case N_MINSAVINGScxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:52:9`!:
791 return minsavingscxx . . $ _SoNurbsMapdesc#minsavings.;
792 default:
793 abortcxx . . $ abort(8df32a62017fbbf6).();
794 return -1; //not necessary, needed to shut up compiler
795 }
796 }
797
798 void
799 Mapdesccxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:68:9`!::setPropertycxx . . $ _SoNurbsMapdesc#setProperty(8cdf330d7f01661).( long property, REALcxx . . $ REAL# value )
800 {
801
802 switch ( property ) {
803 case N_PIXEL_TOLERANCEcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:93:9`!:
804 pixel_tolerancecxx . . $ _SoNurbsMapdesc#pixel_tolerance. = value;
805 break;
806 case N_ERROR_TOLERANCEcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:94:9`!:
807 error_tolerancecxx . . $ _SoNurbsMapdesc#error_tolerance. = value;
808 break;
809 case N_CULLINGcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:57:9`!:
810 culling_methodcxx . . $ _SoNurbsMapdesc#culling_method. = value;
811 break;
812 case N_BBOX_SUBDIVIDINGcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:67:9`!:
813 if( value <= 0.0 ) value = N_NOBBOXSUBDIVISIONcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:68:10`!;
814 bbox_subdividingcxx . . $ _SoNurbsMapdesc#bbox_subdividing. = value;
815 break;
816 case N_S_STEPScxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:103:9`!:
817 if( value < 0.0 ) value = 0.0;
818 s_stepscxx . . $ _SoNurbsMapdesc#s_steps. = value;
819 maxratecxx . . $ _SoNurbsMapdesc#maxrate. = ( value < 0.0 ) ? 0.0 : value;
820 maxsratecxx . . $ _SoNurbsMapdesc#maxsrate. = ( value < 0.0 ) ? 0.0 : value;
821 break;
822 case N_T_STEPScxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:104:9`!:
823 if( value < 0.0 ) value = 0.0;
824 t_stepscxx . . $ _SoNurbsMapdesc#t_steps. = value;
825 maxtratecxx . . $ _SoNurbsMapdesc#maxtrate. = ( value < 0.0 ) ? 0.0 : value;
826 break;
827 case N_SAMPLINGMETHODcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:60:9`!:
828 sampling_methodcxx . . $ _SoNurbsMapdesc#sampling_method. = value;
829 break;
830 case N_CLAMPFACTORcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:50:9`!:
831 if( value <= 0.0 ) value = N_NOCLAMPINGcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:51:10`!;
832 clampfactorcxx . . $ _SoNurbsMapdesc#clampfactor. = value;
833 break;
834 case N_MINSAVINGScxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:52:9`!:
835 if( value <= 0.0 ) value = N_NOSAVINGSSUBDIVISIONcxx . . $ `lib/database/src/so/nodes/nurbs/head/nurbsconsts.h:53:10`!;
836 minsavingscxx . . $ _SoNurbsMapdesc#minsavings. = value;
837 break;
838 default:
839 abortcxx . . $ abort(8df32a62017fbbf6).();
840 break;
841 }
842 }
843