ftp.nice.ch/pub/next/science/mathematics/hippoplotamus.2.0.s.tar.gz#/hippo2.0/h3D.h

This is h3D.h in view mode; [Download] [Up]

#ifndef _THREED_H_		/* only include once */
#define _THREED_H_

#include "hippo.h"

#define MAXPSLINES 1200

/*
 * Structure defining 3D workarea.
 */
#define maxTicks 20

typedef struct threeD_s
{
    float               matrix[16];
    float               cosTheta, sinTheta, cosPhi, sinPhi; 
    float               thetaSave[16], phiSave[16], distSave[16];
    int	                thetaIsSaved, phiIsSaved, distIsSaved;

    float               cube[3][8], xTicks[3][2 * maxTicks], yTicks[3][2 * 	
    			maxTicks], zTicks[3][4 * maxTicks];
    int                 nXTicks, nYTicks, nZTicks;
    char 		xLabels[maxTicks][10], yLabels[maxTicks][10],
    			zLabels[maxTicks][10];
    float               boundingBox[4], limits[6];
    float               maxval[3], minval[3];
    int			tupleX, tupleY, tupleZ;
    int                 preferredFace;
    int	                reCalculateCube, reCalculateLegoPoints2D, 
    			reCalculateLegoPoints3D, reCalculateFill, 	
			reCalculateScatterPoints;
    float              *legoPoints[3], *legoResults[3];
    int                 nLegoPoints;
    int                 nScatterPoints;
    float              *scatterResults;
    float              *cubeResults[2];
    float               cubeU[8], cubeV[8];
    float              *xTickResults[2], *yTickResults[2], *zTickResults[2];
    float               xTickU[2 * maxTicks], xTickV[2 * maxTicks];
    float               yTickU[2 * maxTicks], yTickV[2 * maxTicks];
    float               zTickU[4 * maxTicks], zTickV[4 * maxTicks];
    float              *cArray;
    char               *oArray;
    char	       *plotCharBuffer;
    struct block {
	float              *xData;
	float              *yData;
	float               maxZ;
	float               minZ;
	int                 nearCorner;
    }                  *blockBank, **blockPointer;
    int                 numBlocks;
}                   threeD_t;

/*
 * External C Functions 
 */
int h3D_init3D(display disp);
void h3D_setNearFace(display disp);
void h3D_setDirty(display disp);
void h3D_resetAngles(display disp);

int h3D_checkAllocLego(display disp);
int h3D_checkAllocScatterResults(display disp, int nCoords);
void h3D_checkBinScale(display disp);
void h3D_checkPointScale(display disp, int nCoords);
void h3D_transformCube(display disp); 
void h3D_transformLego(display disp);
void h3D_transformWireFrame(display disp);
void h3D_transformMesh(display disp);
int h3D_myCompare(const struct block ** ptr1, const struct block ** ptr2);

void h3D_render3D(display disp, int n, float *x, float *y, float *z, float **results);
void h3D_render2D(display disp, int n, float *x, float *y, float *z, float **results);
void h3D_renderXYShow(display disp, float *coords);
void h3D_renderXYPS(display disp, float *coords);
void h3D_reScaleMatrix(display disp);
void h3D_newTheta(display disp);
void h3D_newPhi(display disp);
void h3D_newDist(display disp);

#endif				/* end of ifndef _THREED_H_ */

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.