56 hcoords = _ncoords + (_israt ? 0 : 1 );
106 long rstride,
long cstride )
109 for(
int i=0;
i !=
n;
i++ )
110 for(
int j=0;
j !=
n;
j++ )
164 dst[3] = src1[3] *
alpha + src2[3] * beta;
165 dst[2] = src1[2] *
alpha + src2[2] * beta;
166 dst[1] = src1[1] *
alpha + src2[1] * beta;
167 dst[0] = src1[0] *
alpha + src2[0] * beta;
170 dst[2] = src1[2] *
alpha + src2[2] * beta;
171 dst[1] = src1[1] *
alpha + src2[1] * beta;
172 dst[0] = src1[0] *
alpha + src2[0] * beta;
175 dst[1] = src1[1] *
alpha + src2[1] * beta;
176 dst[0] = src1[0] *
alpha + src2[0] * beta;
179 dst[0] = src1[0] *
alpha + src2[0] * beta;
182 dst[4] = src1[4] *
alpha + src2[4] * beta;
183 dst[3] = src1[3] *
alpha + src2[3] * beta;
184 dst[2] = src1[2] *
alpha + src2[2] * beta;
185 dst[1] = src1[1] *
alpha + src2[1] * beta;
186 dst[0] = src1[0] *
alpha + src2[0] * beta;
210 unsigned int bits = 0;
212 if( pw == 0.0 )
return mask;
217 if(
p[2] <= pw )
bits |= (1<<5);
218 if(
p[2] >= nw )
bits |= (1<<4);
219 if(
p[1] <= pw )
bits |= (1<<3);
220 if(
p[1] >= nw )
bits |= (1<<2);
221 if(
p[0] <= pw )
bits |= (1<<1);
222 if(
p[0] >= nw )
bits |= (1<<0);
225 if(
p[1] <= pw )
bits |= (1<<3);
226 if(
p[1] >= nw )
bits |= (1<<2);
227 if(
p[0] <= pw )
bits |= (1<<1);
228 if(
p[0] >= nw )
bits |= (1<<0);
231 if(
p[0] <= pw )
bits |= (1<<1);
232 if(
p[0] >= nw )
bits |= (1<<0);
236 for(
int i=0;
i<nc;
i++ ) {
237 if(
p[
i] >= nw )
bits |= bit;
239 if(
p[
i] <= pw )
bits |= bit;
249 if(
p[2] <= nw )
bits |= (1<<5);
250 if(
p[2] >= pw )
bits |= (1<<4);
251 if(
p[1] <= nw )
bits |= (1<<3);
252 if(
p[1] >= pw )
bits |= (1<<2);
253 if(
p[0] <= nw )
bits |= (1<<1);
254 if(
p[0] >= pw )
bits |= (1<<0);
257 if(
p[1] <= nw )
bits |= (1<<3);
258 if(
p[1] >= pw )
bits |= (1<<2);
259 if(
p[0] <= nw )
bits |= (1<<1);
260 if(
p[0] >= pw )
bits |= (1<<0);
263 if(
p[0] <= nw )
bits |= (1<<1);
264 if(
p[0] >= pw )
bits |= (1<<0);
268 for(
int i=0;
i<nc;
i++ ) {
269 if(
p[
i] >= pw )
bits |= bit;
271 if(
p[
i] <= nw )
bits |= bit;
361 unsigned int inbits =
mask;
362 unsigned int outbits = 0;
373 if( ( outbits == (
unsigned int)
mask ) && ( inbits != (
unsigned int)
mask ) )
return CULL_ACCEPT;
377 if( outbits != (
unsigned int)
mask ) {
379 }
else if( inbits == (
unsigned int)
mask ) {
395 unsigned int inbits =
mask;
396 unsigned int outbits = 0;
405 if( ( outbits == (
unsigned int)
mask ) && ( inbits != (
unsigned int)
mask ) )
return CULL_ACCEPT;
409 if( outbits != (
unsigned int)
mask ) {
411 }
else if( inbits == (
unsigned int)
mask ) {
427 unsigned int inbits =
mask;
428 unsigned int outbits = 0;
435 if( ( outbits == (
unsigned int)
mask ) && ( inbits != (
unsigned int)
mask ) )
return CULL_ACCEPT;
438 if( outbits != (
unsigned int)
mask ) {
440 }
else if( inbits == (
unsigned int)
mask ) {
487 REAL *
cp,
int outustride,
int outvstride )
502 REAL *
sp,
int outustride,
int outvstride )
511 REAL *
sp,
int outustride,
int outvstride )
544 REAL *
cp,
int outustride,
int outvstride )
585 sumPt( qp, qp, qpnt, mv,
v );
596 int so,
int ss,
int to,
int ts )
606 for(
REAL *qpnt =
sp+ts; qpnt !=
send; qp = qpnt, qpnt += ts )
607 sumPt( qp, qp, qpnt, mv,
v );
613 #define sign(x) ((x > 0) ? 1 : ((x < 0.0) ? -1 : 0)) 621 REAL *
dest,
int trstride,
int tcstride,
622 int nrows,
int ncols )
625 REAL *rlast =
src + nrows * rstride;
627 for(
REAL *rptr=
src; rptr != rlast; rptr+=rstride, trptr+=trstride ) {
628 REAL *clast = rptr + ncols * cstride;
630 for(
REAL *cptr = rptr; cptr != clast; cptr+=cstride, tcptr+=tcstride ) {
632 if(
sign( *coordlast ) !=
s )
return 0;
633 REAL *tcoord = tcptr;
635 *tcoord = *
coord / *coordlast;
652 for(
REAL *cptr =
src, *tcptr =
dest; cptr != clast; cptr+=
stride, tcptr+=tstride ) {
654 if(
sign( *coordlast ) !=
s )
return 0;
656 *tcoord = *
coord / *coordlast;
672 const int trstride =
sizeof(bbpts[0]) /
sizeof(
REAL);
673 const int tcstride =
sizeof(bbpts[0][0]) /
sizeof(
REAL);
678 &bbpts[0][0][0], trstride, tcstride, nrows, ncols );
679 if(
val == 0 )
return -1;
682 bbox( bb, &bbpts[0][0][0], trstride, tcstride, nrows, ncols );
706 bb[0][
k] = bb[1][
k] =
p[
k];
708 for(
int i=0;
i != nrows;
i++ )
709 for(
int j=0;
j != ncols;
j++ )
712 if(
x < bb[0][
k] ) bb[0][
k] =
x;
713 else if(
x > bb[1][
k] ) bb[1][
k] =
x;
729 const int tstride =
sizeof(tmp[0]) /
sizeof(
REAL);
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint vstride
GLdouble GLdouble GLint ustride
#define N_BBOX_SUBDIVIDING
GLuint GLdouble GLdouble GLint GLint order
GLubyte GLubyte GLubyte GLubyte w
#define N_ERROR_TOLERANCE
void xformCulling(REAL *, int, int, REAL *, int)
REAL calcPartialVelocity(REAL *, int, int, int, REAL)
void copyPt(REAL *, REAL *)
void surfbbox(REAL bb[2][MAXCOORDS])
GLint GLint GLint GLint GLint x
int project(REAL *, int, REAL *, int, int)
REAL calcVelocityRational(REAL *, int, int)
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint vorder
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
void xformBounding(REAL *, int, int, REAL *, int)
REAL Maxmatrix[MAXCOORDS][MAXCOORDS]
int cullCheck(REAL *, int, int)
void surfbbox(long, REAL *, REAL *)
REAL calcVelocityNonrational(REAL *, int, int)
#define N_PIXEL_TOLERANCE
void setBboxsize(INREAL *)
int bboxTooBig(REAL *, int, int, int, int, REAL [2][MAXCOORDS])
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define N_NOSAVINGSSUBDIVISION
GLdouble GLdouble GLint GLint uorder
GLboolean GLboolean GLboolean b
void setProperty(long, REAL)
#define N_NOBBOXSUBDIVISION
INT WSAAPI send(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags)
GLdouble GLdouble GLdouble GLdouble q
void bbox(REAL [2][MAXCOORDS], REAL *, int, int, int, int)
void identify(REAL[MAXCOORDS][MAXCOORDS])
unsigned int clipbits(REAL *)
void subdivide(REAL *, REAL *, REAL, int, int)
void xformSampling(REAL *, int, int, REAL *, int)
#define memcpy(s1, s2, n)
GLsizei const GLfloat * value
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
void xformRational(Maxmatrix, REAL *, REAL *)
#define CULL_TRIVIAL_ACCEPT
void xformNonrational(Maxmatrix, REAL *, REAL *)
static void copy(Maxmatrix, long, INREAL *, long, long)
GLint GLint GLint GLint GLint GLint y
Mapdesc(long, int, int, Backend &)
GLclampf GLclampf GLclampf alpha
GLuint GLuint GLsizei GLenum type
int xformAndCullCheck(REAL *, int, int, int, int)
void sumPt(REAL *, REAL *, REAL *, REAL, REAL)
#define CULL_TRIVIAL_REJECT
void xformMat(Maxmatrix, REAL *, int, int, REAL *, int)