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);
void surfbbox(long, REAL *, REAL *)
REAL calcPartialVelocity(REAL *, int, int, int, REAL)
void xformCulling(REAL *, int, int, REAL *, int)
void setBboxsize(INREAL *)
void xformRational(Maxmatrix, REAL *, REAL *)
void xformNonrational(Maxmatrix, REAL *, REAL *)
void copyPt(REAL *, REAL *)
void subdivide(REAL *, REAL *, REAL, int, int)
int cullCheck(REAL *, int, int)
void identify(REAL[MAXCOORDS][MAXCOORDS])
void sumPt(REAL *, REAL *, REAL *, REAL, REAL)
int xformAndCullCheck(REAL *, int, int, int, int)
void xformBounding(REAL *, int, int, REAL *, int)
unsigned int clipbits(REAL *)
static void copy(Maxmatrix, long, INREAL *, long, long)
void xformMat(Maxmatrix, REAL *, int, int, REAL *, int)
REAL calcVelocityNonrational(REAL *, int, int)
void bbox(REAL[2][MAXCOORDS], REAL *, int, int, int, int)
int project(REAL *, int, REAL *, int, int)
Mapdesc(long, int, int, Backend &)
void xformSampling(REAL *, int, int, REAL *, int)
void surfbbox(REAL bb[2][MAXCOORDS])
void setProperty(long, REAL)
REAL calcVelocityRational(REAL *, int, int)
int bboxTooBig(REAL *, int, int, int, int, REAL[2][MAXCOORDS])
#define CULL_TRIVIAL_ACCEPT
#define CULL_TRIVIAL_REJECT
INT WSAAPI send(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLclampf GLclampf GLclampf alpha
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble GLdouble q
GLdouble GLdouble GLint ustride
GLdouble GLdouble GLint GLint uorder
GLboolean GLboolean GLboolean b
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint vorder
GLuint GLdouble GLdouble GLint GLint order
GLubyte GLubyte GLubyte GLubyte w
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint vstride
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
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
REAL Maxmatrix[MAXCOORDS][MAXCOORDS]
#define memcpy(s1, s2, n)
#define N_BBOX_SUBDIVIDING
#define N_NOSAVINGSSUBDIVISION
#define N_PIXEL_TOLERANCE
#define N_ERROR_TOLERANCE
#define N_NOBBOXSUBDIVISION