|
|
Microsoft Windows NT Build 297 06-28-1992
/************************************************************************\
*
* PAINT.H
*
\************************************************************************/
/************************************************************************\
* SYMBOLIC CONSTANTS
\************************************************************************/
#define NUMVERTICES 8 /* number of polyhedron vertices */
#define NUMFACETS 6 /* number of polyhedron facets */
#define MAX_POINTS_PER_FACET 4
#define XROT_INCREMENT (float) 0.0872 /* 5 degrees */
#define YROT_INCREMENT (float) 0.1744 /* 10 degrees */
#define ZROT_INCREMENT (float) 0.2617 /* 15 degrees */
/************************************************************************\
* TYPEDEFs
\************************************************************************/
typedef struct { LONG x, y, z; } POINT3D;
/************************************************************************\
* GLOBAL VARIABLES
\************************************************************************/
/* This particular set of vertices ("v") and facets describe a normalized
* cube centered about the origin. The facet list is made up of a series
* of indexes into the array of vertices, each describing an individual
* facet (eg. a polygon), and are separated by -1. Note that the facets
* are decribed in COUNTERCLOCKWISE order (so we can consistently find
* the normal to any given facet).
*/
static POINT3D v[NUMVERTICES] = {{ 1, 1, 1}, { 1,-1, 1},
{-1,-1, 1}, {-1, 1, 1},
{ 1, 1,-1}, { 1,-1,-1},
{-1,-1,-1}, {-1, 1,-1} };
static int facets[30] = { 3, 2, 1, 0, -1,
4, 5, 6, 7, -1,
0, 1, 5, 4, -1,
6, 2, 3, 7, -1,
7, 3, 0, 4, -1,
5, 1, 2, 6, -1 };
POINT3D xv[NUMVERTICES]; /* will hold the transformed points in "v" */
float m[2][3]; /* the transformation matrix */
/************************************************************************\
* FUNCTION PROTOTYPES
\************************************************************************/
void ComputeXform (float, float, float);
void XformVertices (int, int);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.