-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathengineTypes.h
77 lines (68 loc) · 1.64 KB
/
engineTypes.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
67
68
69
70
71
72
73
74
75
76
77
typedef struct{
float maxX;
float minX;
float maxY;
float minY;
float maxZ;
float minZ;
}boundingBox;
//idk about this one atm
typedef struct{
vertexBuffer* vb;
colorBuffer* cb;
normalBuffer* nb;
vec3* centroid;
boundingBox* bb;
//this could be useful but also lowkey we can just rotate before translating a lot of the time
matrix4x4 worldSpaceMatrix;
}mesh;
typedef struct{
mesh** meshes;
char* indexBuffer;
vec3* cameraVector;
vec3* lightVector;
int length;
//int currentLength;
}scene;
typedef struct{
float translateX;
float translateY;
float translateZ;
float rotateX;
float rotateY;
float rotateZ;
float explodeScalar;
float* rotationX;
float* rotationY;
float* rotationZ;
float* translation;
float* perspectiveProjection;
//might keep this for misc matrices
float* matrixArray;
int matrixArrayLength;
}transformSpec;
//im unsure about the idea of having structs that are
//this contains all data in one struct
//ideally this should simplify the javaScript part
typedef struct{
scene* sc;
renderContext* rc;
transformSpec* ts;
}webContext;
//this is exclusive to OpenCL implementations
// typedef struct{
// void* context;
// void* deviceId;
// void*program;
// void* commandQueue;
// void* kernel;
// void* vertexOutput;
// void* colorOutput;
// // cl_context context;
// // cl_device_id deviceId;
// // cl_program program;
// // cl_command_queue commandQueue;
// // cl_kernel kernel;
// // cl_mem vertexOutput;
// // cl_mem colorOutput;
// }openClResources;