/
CLTypes.h
115 lines (105 loc) · 1.8 KB
/
CLTypes.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#pragma once
#include "cll.h"
struct cl_RGB32
{
cl_uchar CL_ALIGNED(4) s[4];
}; // 4 bytes
struct cl_MeshInfo
{
cl_uint tCount;
cl_uint vCount;
cl_uint nCount;
cl_float radius;
cl_float3 center;
}; // 32 bytes
struct cl_SurfInfo
{
cl_uint layers;
cl_uint height;
cl_uint width;
cl_uint count;
}; // 16 bytes
struct cl_ObjectInfo
{
cl_float3 center;
cl_float3 lastPos;
cl_float3 position;
cl_float3 orientation;
cl_float3 velocity;
cl_float3 rotation;
cl_float radius;
cl_float radius2;
cl_float mass;
cl_float scale;
cl_RGB32 color;
cl_int type;
cl_uint index;
cl_uint boolBits;
}; // 128 bytes
struct cl_Material
{
cl_float3 ambient;
cl_float3 diffuse;
cl_float3 specular;
cl_float shininess;
cl_float glossiness;
cl_float reflectivity;
cl_float transparency;
}; // 64 bytes
struct cl_Substance
{
cl_uint type;
cl_float density;
cl_float friction;
cl_float hardness;
cl_float rigidity;
cl_float strength;
cl_float roughness;
cl_float elasticity;
}; // 32 bytes
struct cl_Triangle
{
cl_float2 texMap[3];
cl_uint vertIndex[3];
cl_uint normIndex[3];
cl_uint texIndex;
cl_uint matIndex;
cl_uint subIndex;
cl_uint type;
}; // 64 bytes
struct cl_AAInfo
{
cl_uint lvl;
cl_uint dim;
cl_float inc;
cl_float div;
};
struct cl_RenderInfo
{
cl_AAInfo aa_info;
cl_uint pixels_X;
cl_uint t_depth;
cl_float cam_foc;
cl_float cam_apt;
cl_float3 cam_pos;
cl_float3 cam_ori;
cl_float3 cam_fwd;
cl_float3 cam_rgt;
cl_float3 cam_up;
cl_float3 bl_ray;
}; // 128 bytes
struct cl_RayIntersect
{
union {
struct {
cl_float3 point;
cl_float3 normal;
};
struct {
cl_float pnt[3];
cl_float depth;
cl_float nrm[3];
cl_uint matIndex;
};
};
}; // 32 bytes