Defines | Functions

mbs30f.c File Reference

#include <math.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "pkvaria.h"
#include "pkgeom.h"
#include "multibs.h"
#include "msgpool.h"
Include dependency graph for mbs30f.c:

Defines

#define T0   0.5
#define T1   0.53125
#define T2   0.46875
#define STKSIZE   32
#define NEIGHBOURS(a, b)   abs(a.x-b.x) <= 1 && abs(a.y-b.y) <= 1
#define OUTPUT(px)
#define PUSH(p, v)   { if (stp < STKSIZE) { stack[stp].px = p; stack[stp].vx = v; stp++; } }
#define READ(p, v)   { p = stack[stp-1].px; v = stack[stp-1].vx; }
#define POP   stp--;

Functions

void mbs_RasterizeBC2f (int degree, const point2f *cpoints, void(*output)(const xpoint *buf, int n), boolean outlast)
void mbs_RasterizeBC2Rf (int degree, const point3f *cpoints, void(*output)(const xpoint *buf, int n), boolean outlast)
void mbs_RasterizeBS2f (int degree, int lastknot, const float *knots, const point2f *cpoints, void(*output)(const xpoint *buf, int n), boolean outlast)
void mbs_RasterizeBS2Rf (int degree, int lastknot, const float *knots, const point3f *cpoints, void(*output)(const xpoint *buf, int n), boolean outlast)

Define Documentation

#define NEIGHBOURS (   a,
  b 
)    abs(a.x-b.x) <= 1 && abs(a.y-b.y) <= 1
#define OUTPUT (   px  ) 
Value:
{ if ( _pkv_npix == PKV_BUFSIZE ) { _pkv_npix -= 2;  PKV_FLUSH \
      memcpy ( &_pkv_pixbuf[0], &_pkv_pixbuf[PKV_BUFSIZE-2], 2*sizeof(xpoint) ); \
      _pkv_npix = 2; } \
    if ( _pkv_npix > 1 ) \
      { if ( NEIGHBOURS ( px, _pkv_pixbuf[_pkv_npix-2] ) ) _pkv_npix--; } \
    _pkv_pixbuf[_pkv_npix] = px;  _pkv_npix++; }
#define POP   stp--;
#define PUSH (   p,
  v 
)    { if (stp < STKSIZE) { stack[stp].px = p; stack[stp].vx = v; stp++; } }
#define READ (   p,
  v 
)    { p = stack[stp-1].px; v = stack[stp-1].vx; }
#define STKSIZE   32
#define T0   0.5
#define T1   0.53125
#define T2   0.46875

Function Documentation

void mbs_RasterizeBC2f ( int  degree,
const point2f cpoints,
void(*)(const xpoint *buf, int n)  output,
boolean  outlast 
)
void mbs_RasterizeBC2Rf ( int  degree,
const point3f cpoints,
void(*)(const xpoint *buf, int n)  output,
boolean  outlast 
)
void mbs_RasterizeBS2f ( int  degree,
int  lastknot,
const float *  knots,
const point2f cpoints,
void(*)(const xpoint *buf, int n)  output,
boolean  outlast 
)
void mbs_RasterizeBS2Rf ( int  degree,
int  lastknot,
const float *  knots,
const point3f cpoints,
void(*)(const xpoint *buf, int n)  output,
boolean  outlast 
)