| 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 |
* gl4curveval.c++ - curve evaluator |
| 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 "gl4curveval.h" |
| 48 |
|
| 49 |
/* |
| 50 |
extern "C" { |
| 51 |
void gl_nurbs_bgncps1( long, float, float, long ); |
| 52 |
void gl_nurbs_cp1f( float ); |
| 53 |
void gl_nurbs_cp2f( const float[2] ); |
| 54 |
void gl_nurbs_cp3f( const float[3] ); |
| 55 |
void gl_nurbs_cp4f( const float[4] ); |
| 56 |
void gl_nurbs_endcps1( void ); |
| 57 |
void gl_nurbs_mapmesh1f( long, long, long ); |
| 58 |
void gl_nurbs_mapgrid1f( long, float, float ); |
| 59 |
void gl_nurbs_evalcoord1f( float ); |
| 60 |
void gl_nurbs_evalpoint1i( long ); |
| 61 |
void gl_nurbs_bgnmap1f( void ); |
| 62 |
void gl_nurbs_endmap1f( void ); |
| 63 |
void gl_nurbs_bgnline( long ); |
| 64 |
void gl_nurbs_endline( void ); |
| 65 |
}; |
| 66 |
*/ |
| 67 |
void |
| 68 |
_SoNurbsGL4CurveEval::bgnmap1f( long ) |
| 69 |
{ |
| 70 |
// gl_nurbs_bgnmap1f(); |
| 71 |
} |
| 72 |
|
| 73 |
void |
| 74 |
_SoNurbsGL4CurveEval::endmap1f( void ) |
| 75 |
{ |
| 76 |
// gl_nurbs_endmap1f(); |
| 77 |
} |
| 78 |
|
| 79 |
void |
| 80 |
_SoNurbsGL4CurveEval::map1f( |
| 81 |
long, /* control point type */ |
| 82 |
REAL, /* u lower domain coord */ |
| 83 |
REAL, /* u upper domain coord */ |
| 84 |
long, /* interpoint distance */ |
| 85 |
long, /* parametric order */ |
| 86 |
REAL * ) /* control points */ |
| 87 |
{ |
| 88 |
/* |
| 89 |
assert( sizeof( REAL) == sizeof( float ) ); |
| 90 |
// XXX - if REAL != float need to copy ctlpts |
| 91 |
gl_nurbs_bgncps1( type, ulower, uupper, uorder ); |
| 92 |
for( int i=0; i != uorder; i++ ) |
| 93 |
gl_nurbs_cp4f( &(ctlpts[i*ustride]) ); |
| 94 |
gl_nurbs_endcps1(); |
| 95 |
*/ |
| 96 |
} |
| 97 |
|
| 98 |
void |
| 99 |
_SoNurbsGL4CurveEval::mapmesh1f( long, long, long ) |
| 100 |
{ |
| 101 |
// gl_nurbs_mapmesh1f( style, umin, umax ); |
| 102 |
} |
| 103 |
|
| 104 |
void |
| 105 |
_SoNurbsGL4CurveEval::evalcoord1f( long, REAL ) |
| 106 |
{ |
| 107 |
// gl_nurbs_evalcoord1f( u ); |
| 108 |
} |
| 109 |
|
| 110 |
/*------------------------------------------------------------------------- |
| 111 |
* mapgrid1f - define a lattice of points with origin and offset |
| 112 |
*------------------------------------------------------------------------- |
| 113 |
*/ |
| 114 |
void |
| 115 |
_SoNurbsGL4CurveEval::mapgrid1f( long, REAL, REAL ) |
| 116 |
{ |
| 117 |
// gl_nurbs_mapgrid1f( nu, u0, u1 ); |
| 118 |
} |
| 119 |
|
| 120 |
void |
| 121 |
_SoNurbsGL4CurveEval::bgnline( void ) |
| 122 |
{ |
| 123 |
// gl_nurbs_bgnline(0); |
| 124 |
} |
| 125 |
|
| 126 |
void |
| 127 |
_SoNurbsGL4CurveEval::endline( void ) |
| 128 |
{ |
| 129 |
// gl_nurbs_endline(); |
| 130 |
} |
| 131 |
|
| 132 |
void |
| 133 |
_SoNurbsGL4CurveEval::enable( long ) |
| 134 |
{ |
| 135 |
// no-op |
| 136 |
} |
| 137 |
|
| 138 |
void |
| 139 |
_SoNurbsGL4CurveEval::disable( long ) |
| 140 |
{ |
| 141 |
// no-op |
| 142 |
} |
| 143 |
|
| 144 |
void |
| 145 |
_SoNurbsGL4CurveEval::range1f( long, REAL *, REAL * ) |
| 146 |
{ |
| 147 |
// no-op |
| 148 |
} |
| 149 |
|
| 150 |
void |
| 151 |
_SoNurbsGL4CurveEval::domain1f( REAL, REAL ) |
| 152 |
{ |
| 153 |
// no-op |
| 154 |
} |
| 155 |
|
| 156 |
int |
| 157 |
_SoNurbsGL4CurveEval::canRecord( void ) |
| 158 |
{ |
| 159 |
return 0; |
| 160 |
} |
| 161 |
|
| 162 |
int |
| 163 |
_SoNurbsGL4CurveEval::canPlayAndRecord( void ) |
| 164 |
{ |
| 165 |
return 0; |
| 166 |
} |
| 167 |
|
| 168 |
int |
| 169 |
_SoNurbsGL4CurveEval::createHandle( int ) |
| 170 |
{ |
| 171 |
return 0; |
| 172 |
} |
| 173 |
|
| 174 |
void |
| 175 |
_SoNurbsGL4CurveEval::beginOutput( ServiceMode, int ) |
| 176 |
{ |
| 177 |
} |
| 178 |
|
| 179 |
void |
| 180 |
_SoNurbsGL4CurveEval::endOutput( void ) |
| 181 |
{ |
| 182 |
} |
| 183 |
|
| 184 |
void |
| 185 |
_SoNurbsGL4CurveEval::discardRecording( int ) |
| 186 |
{ |
| 187 |
} |
| 188 |
|
| 189 |
void |
| 190 |
_SoNurbsGL4CurveEval::playRecording( int ) |
| 191 |
{ |
| 192 |
} |