Debian Codegraph @

lib/database/src/so/nodes/nurbs/clients/gl4surfeval.c++

raw
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 * gl4surfeval.c++ - surface evaluator using IRIS GL 4.0 backend
39 *
40 * $Revision: 1.1.1.1 $
41 */
42
43 #include "myglimports.h"
44 #include "myassert.h"
45 #include "mystdio.h"
46 #include "mymath.h"
47 #include "gl4surfeval.h"
48 #include "nurbsconsts.h"
49 #include <cstdio>
50
51 /*extern "C" {
52 void gl_nurbs_bgncps2( long, float, float, long, float, float, long );
53 void gl_nurbs_cp1f( float );
54 void gl_nurbs_cp2f( const float[2] );
55 void gl_nurbs_cp3f( const float[3] );
56 void gl_nurbs_cp4f( const float[4] );
57 void gl_nurbs_endcps2( void );
58 void gl_nurbs_mapmesh2f( long, long, long, long, long );
59 void gl_nurbs_mapgrid2f( long, float, float, long, float, float );
60 void gl_nurbs_evalcoord2f( float, float );
61 void gl_nurbs_evalpoint2i( long, long );
62 void gl_nurbs_bgnmap2f( void );
63 void gl_nurbs_endmap2f( void );
64 void gl_nurbs_bgnline( long );
65 void gl_nurbs_endline( void );
66 void gl_nurbs_bgnclosedline( long );
67 void gl_nurbs_endclosedline( void );
68 void gl_nurbs_bgntmesh( long );
69 void gl_nurbs_swaptmesh( void );
70 void gl_nurbs_endtmesh( void );
71 void gl_nurbs_bgnqstrip( long );
72 void gl_nurbs_endqstrip( void );
73 };
74 */
75 void
76 _SoNurbsGL4SurfaceEval::bgnmap2f( long )
77 {
78 dprintf( "gl_nurbs_bgnmap2f\n" );
79 // gl_nurbs_bgnmap2f();
80 }
81
82 void
83 _SoNurbsGL4SurfaceEval::endmap2f( void )
84 {
85 dprintf( "endmap2f\n" );
86 // gl_nurbs_endmap2f();
87 }
88
89 void
90 _SoNurbsGL4SurfaceEval::map2f(
91 long, /* control point type */
92 REAL, /* u lower domain coord */
93 REAL, /* u upper domain coord */
94 long, /* interpoint distance */
95 long, /* parametric order */
96 REAL, /* v lower domain coord */
97 REAL, /* v upper domain coord */
98 long, /* interpoint distance */
99 long, /* parametric order */
100 REAL * ) /* control points */
101 {
102 if( sizeof( REAL ) != sizeof( float ) ) {
103 assert( 0 );
104 /* XXX
105 float *p = new float[uorder*vorder];
106 int nustride =
107 for( int i=0; i!= uorder; i++ )
108 for( int j=0; j!= vorder; j++ )
109 //copy points
110 */
111 } else {
112 dprintf( "gl_nurbs_bgncps2\n" );
113 // gl_nurbs_bgncps2( type, ulower, uupper, uorder, vlower, vupper, vorder );
114 // for( int j=0; j!= vorder; j++ )
115 // for( int i=0; i!= uorder; i++ )
116 // gl_nurbs_cp4f( &ctlpts[i*ustride + j*vstride] ); /* XXX */
117 // gl_nurbs_endcps2();
118 // dprintf( "gl_nurbs_endcps2\n" );
119 }
120 }
121
122 void
123 _SoNurbsGL4SurfaceEval::mapmesh2f( long, long, long, long, long )
124 {
125 // dprintf( "gl_nurbs_mapmesh2f\n" );
126 // gl_nurbs_mapmesh2f( style, umin, umax, vmin, vmax );
127 }
128
129 /*-------------------------------------------------------------------------
130 * mapgrid2f - define a lattice of points with origin and offset
131 *-------------------------------------------------------------------------
132 */
133 void
134 _SoNurbsGL4SurfaceEval::mapgrid2f( long, REAL, REAL, long, REAL, REAL )
135 {
136 dprintf( "gl_nurbs_mapgrid2f\n" );
137 // gl_nurbs_mapgrid2f( nu, u0, u1, nv, v0, v1 );
138 }
139
140 void
141 _SoNurbsGL4SurfaceEval::evalcoord2f( long, REAL, REAL )
142 {
143 dprintf( "gl_nurbs_evalcoord2f\n" );
144 // gl_nurbs_evalcoord2f( u, v );
145 }
146
147 void
148 _SoNurbsGL4SurfaceEval::evalpoint2i( long, long )
149 {
150 dprintf( "gl_nurbs_evalpoint2i\n" );
151 // gl_nurbs_evalpoint2i( u, v );
152 }
153
154 void
155 _SoNurbsGL4SurfaceEval::bgnline( void )
156 {
157 dprintf( "gl_nurbs_bgnline\n" );
158 // gl_nurbs_bgnline( 0 );
159 }
160
161 void
162 _SoNurbsGL4SurfaceEval::endline( void )
163 {
164 dprintf( "gl_nurbs_endline\n" );
165 // gl_nurbs_endline( );
166 }
167
168 void
169 _SoNurbsGL4SurfaceEval::bgnclosedline( void )
170 {
171 dprintf( "gl_nurbs_bgnclosedline\n" );
172 // gl_nurbs_bgnclosedline( 0 );
173 }
174
175 void
176 _SoNurbsGL4SurfaceEval::endclosedline( void )
177 {
178 dprintf( "gl_nurbs_endclosedline\n" );
179 // gl_nurbs_endclosedline( );
180 }
181
182 void
183 _SoNurbsGL4SurfaceEval::bgntmesh( void )
184 {
185 dprintf( "gl_nurbs_bgntmesh\n" );
186 // gl_nurbs_bgntmesh( 0 );
187 }
188
189 void
190 _SoNurbsGL4SurfaceEval::swaptmesh( void )
191 {
192 dprintf( "gl_nurbs_swaptmesh\n" );
193 // gl_nurbs_swaptmesh();
194 }
195
196 void
197 _SoNurbsGL4SurfaceEval::endtmesh( void )
198 {
199 dprintf( "gl_nurbs_endtmesh\n" );
200 // gl_nurbs_endtmesh();
201 }
202
203 void
204 _SoNurbsGL4SurfaceEval::bgnqstrip( void )
205 {
206 dprintf( "gl_nurbs_bgnqstrip\n" );
207 // gl_nurbs_bgnqstrip( 0 );
208 }
209
210 void
211 _SoNurbsGL4SurfaceEval::endqstrip( void )
212 {
213 dprintf( "gl_nurbs_endqstrip\n" );
214 // gl_nurbs_endqstrip();
215 }
216
217 void
218 _SoNurbsGL4SurfaceEval::enable( long )
219 {
220 dprintf( "enable\n" );
221 }
222
223 void
224 _SoNurbsGL4SurfaceEval::disable( long )
225 {
226 dprintf( "disable\n" );
227 }
228
229 void
230 _SoNurbsGL4SurfaceEval::range2f( long, REAL *, REAL * )
231 {
232 // no-op
233 }
234
235 void
236 _SoNurbsGL4SurfaceEval::domain2f(REAL, REAL, REAL, REAL )
237 {
238 // no-op
239 }
240
241 int
242 _SoNurbsGL4SurfaceEval::canRecord( void )
243 {
244 return 0;
245 }
246
247 int
248 _SoNurbsGL4SurfaceEval::canPlayAndRecord( void )
249 {
250 return 0;
251 }
252
253 int
254 _SoNurbsGL4SurfaceEval::createHandle( int )
255 {
256 return 0;
257 }
258
259 void
260 _SoNurbsGL4SurfaceEval::beginOutput( ServiceMode, int )
261 {
262 }
263
264 void
265 _SoNurbsGL4SurfaceEval::endOutput( void )
266 {
267 }
268
269 void
270 _SoNurbsGL4SurfaceEval::discardRecording( int )
271 {
272 }
273
274 void
275 _SoNurbsGL4SurfaceEval::playRecording( int )
276 {
277 }