|
Prisms Development Toolkit Documentation
Side Effects Software Inc. 1997
|
Programmers Reference Section
Prisms Defined Types
typedef
struct p_point {
int flag; /* Flag for defined bits */
int num; /* Number in the linked list */
Point pos; /* Point coordinates */
Txtr txt; /* Point texture coordinates */
Color clr; /* Point color */
Vector nml; /* Point normal */
char *sparePointer; /* Program dependent data */
struct p_point *next; /* Forward pointer to next point */
struct p_point *prev; /* Back pointer to last point */
} PolyPoint, *PolyPointPointer;
typedef
struct p_vertex {
int flag; /* Flag for defined bits */
PolyPoint *ppt; /* Pointer to the point data */
char *sparePointer; /* Program dependent data */
struct p_vertex *next; /* Forward pointer to next vertex */
struct p_vertex *prev; /* Back pointer to last vertex */
} PolyVertex, *PolyVertexPointer;
typedef
struct p_polygon {
int flag; /* Flag for defined bits */
int npts; /* Number of points in polygon */
PolyVertex *pvtx; /* Pointer to the vertex list */
Vector nml; /* Polygon normal */
Color clr; /* Polygon color */
char *sparePointer; /* Program dependent data */
struct p_polygon *next; /* Forward pointer to next polygon */
struct p_polygon *prev; /* Back pointer to last polygon */
} Polygon, *PolygonPointer;
typedef
struct p_detail {
int flag; /* Flag for defined bits */
int fd; /* Unix file descriptor */
char *sparePointer; /* Program dependent data */
int npts; /* Number of points in object */
PolyPoint *ppt; /* Pointer to points */
int npolys; /* Number of polygons in object */
Polygon *ppoly; /* Pointer to polygons */
struct p_detail *next; /* Fwd pointer to next object */
struct p_detail *prev; /* Back pointer to last object */
} PolyDetail, *PolyDetailPointer;
typedef struct {
float x; /* 3-D x coordinate */
float y; /* 3-D y coordinate */
float z; /* 3-D z coordinate */
float w; /* Homogeneous coordinate */
} Point, *PointPointer;
typedef struct {
float x; /* 3-D x component */
float y; /* 3-D y component */
float z; /* 3-D z component */
} Vector, *VectorPointer;
typedef struct {
float r; /* Color red */
float g; /* Color green */
float b; /* Color blue */
float t; /* Transparency */
} Color, *ColorPointer;
The flags for polygons and points are set using these constants:
VERTEX_CLRS point colors
VERTEX_TXT texture
VERTEX_NML normal
POLY_CLRS polygon colors
CLOSED polygon is closed
typedef float POINT[4];
typedef float VECTOR[3];
typedef float COLOR[4];
typedef float TEXTURE[2];
typedef float Mat33[3][3];
typedef float Mat44[4][4];
Note there is a difference between VECTORs and Vectors - one is an
array of values, and the other is a structure. This is true for
POINT/Point and COLOR/Color. They use different macros/subroutines.
Tookit Overview
Expression Functions |
User Functions |
Custom SOPs
Prisms Internal Format |
Programmer's Reference
Compiling SOPs |
Using sopbuild |
SOP Routine Reference
Dynamic SOPs |
Prisms Types |
Macros
Math Routines |
Data Routines |
Polygon Routines |
Winged-edge Routines
Copyright © 1997 Side Effects Software Inc.
477 Richmond Street West, Toronto, Ontario, Canada M5V 3E7