cylinder.h
C header source for Polychorons, 90 lines. Raw file
/*
CYLINDER
Generic cylinder which can be put along any path and given a height map
If you want to use a radius function, set
drawCylinder_getPoint = drawCylinder_getPoint_radiusMap
drawCylinder_getRadius = your radius functions
*/
#ifndef __CYLINDER_H__
#define __CYLINDER_H__
// this will be a pure scope function (no params, everything coming from environment.
extern double time;
//---- CYLINDER RADIUS MAP FUNCTIONS
typedef double (*DRAWCYLINDER_GETRADIUS)( double around, double along );
double drawCylinder_getRadius_standard( double around, double along );
double drawCylinder_getRadius_animation001( double around, double along );
extern DRAWCYLINDER_GETRADIUS drawCylinder_getRadius;
//---- CYLINDER POINT MAP FUNCTIONS
typedef void (*DRAWCYLINDER_GETPOINT)( double around, double along, double &x, double &y, double &z );
//- drawCylinder_getPoint_standard
void drawCylinder_getPoint_standard( double around, double along, double &x, double &y, double &z );
//- drawCylinder_getPoint_radiusMap
void drawCylinder_getPoint_radiusMap( double around, double along, double &x, double &y, double &z );
//- drawCylinder_getPoint_torus
extern double drawCylinder_getPoint_torus_majorRadius;
void drawCylinder_getPoint_torus( double around, double along, double &x, double &y, double &z );
extern int drawCylinder_segmentsLong; // How many segments long the cylinder is
extern int drawCylinder_segmentsAround; // How many segments around the circumference of the cylinder
extern double drawCylinder_radius; // Radius of the cylinder
extern double drawCylinder_length; // Length of the cylinder
extern DRAWCYLINDER_GETPOINT drawCylinder_getPoint;
void drawCylinder();
#endif