-
Notifications
You must be signed in to change notification settings - Fork 0
/
snowflake.h
66 lines (44 loc) · 1.54 KB
/
snowflake.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef SNOWFLAKE_H
#define SNOWFLAKE_H
extern int size;
typedef struct snowflake snowflake;
struct snowflake{
int idx;
double* voxelSpace; //3d array of voxels describing shell
int voxCubeLen; //dimensions of voxelSpace x*y*z
double originX, originY, originZ;
//integers to bound the extremes, used to calc eclippse
double xMax, yMax, zMax;//qed
double xMin, yMin, zMin;
//variables for ellipsoid description??? deprecated
//x^2/a^2 + y^2/b^2 + z^2/c^2 = 1
//double eX, eY, eZ;
double sX, sY, sZ;
//ellipsoid coefficents = 1 / {[(Max - Min)/2]^2}
snowflake** neighborCollisions;//set of nearby structs
int neighSize;//num of elements in neighbor
};
//Snowflake Creation
snowflake* initSnowflake(int, int, int, int);
/* Snowflake Operations */
void setOrigin(snowflake*, double, double, double);
void setEllipses(snowflake*, int, int, int);
void combineGeom(snowflake*, snowflake*);
int boxCollide(snowflake*, snowflake*);
void import2DArr(snowflake*, double*, int);
void updateMaxMin(snowflake*);
/* Snowflake Translations */
void rotate(snowflake*, double, double, double, double);
void translate(snowflake*, double, double, double);
void scale(snowflake*, double, double ,double);
/*rotate: angle, x, y, z
*translate: x...
*scale: x...
* */
/* Logging functions(depend on snowflake) */
void displayExtreme(snowflake*);
void printLocal(snowflake*, int);
void write_file3D(int, snowflake*, int);
/* Extraneous Logging*/
void write_file2D(int, double*, int);
#endif