#include <math.h>#include <string.h>#include <stdio.h>#include <stdlib.h>#include "pkvaria.h"#include "pkgeom.h"#include "multibs.h"#include "msgpool.h"
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_RasterizeBC2d (int degree, const point2d *cpoints, void(*output)(const xpoint *buf, int n), boolean outlast) |
| void | mbs_RasterizeBC2Rd (int degree, const point3d *cpoints, void(*output)(const xpoint *buf, int n), boolean outlast) |
| void | mbs_RasterizeBS2d (int degree, int lastknot, const double *knots, const point2d *cpoints, void(*output)(const xpoint *buf, int n), boolean outlast) |
| void | mbs_RasterizeBS2Rd (int degree, int lastknot, const double *knots, const point3d *cpoints, void(*output)(const xpoint *buf, int n), boolean outlast) |
| #define NEIGHBOURS | ( | a, | ||
| b | ||||
| ) | abs(a.x-b.x) <= 1 && abs(a.y-b.y) <= 1 |
| #define OUTPUT | ( | px | ) |
{ 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 |
| void mbs_RasterizeBC2d | ( | int | degree, | |
| const point2d * | cpoints, | |||
| void(*)(const xpoint *buf, int n) | output, | |||
| boolean | outlast | |||
| ) |
| void mbs_RasterizeBC2Rd | ( | int | degree, | |
| const point3d * | cpoints, | |||
| void(*)(const xpoint *buf, int n) | output, | |||
| boolean | outlast | |||
| ) |
| void mbs_RasterizeBS2d | ( | int | degree, | |
| int | lastknot, | |||
| const double * | knots, | |||
| const point2d * | cpoints, | |||
| void(*)(const xpoint *buf, int n) | output, | |||
| boolean | outlast | |||
| ) |
1.7.1