-
Notifications
You must be signed in to change notification settings - Fork 0
/
Config.h
67 lines (49 loc) · 1.4 KB
/
Config.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
#ifndef CONFIG_H
#define CONFIG_H
#define GPU_SPEED_UP 1
// ! WARNINGS !
// Please be extremely careful to change the following numbers
// There're limited block\thread resources in CUDA 1.0
//
#define SCENESIZE 20
#define DOMAIN_HEIGHT 40
#define SCENEHEIGHT 0
// GPU Kernel Func
#define BLOCK_DIM_1D 2048
#define THREAD_DIM_1D 256
#define PI (3.1415926)
extern int WindowWidth;
extern int WindowHeight;
// How fine the WHOLE simulation process will work on
#define SpaceGranularity 0.5
#define SUN_VEC {-1,-1,-1}
// Space Colonization Params
#define OccuRadius 1.8
#define PerceptionRadius 3.6
#define PerceptionAngle 30
#define MaxShadowLayer 2
// Space Partitioning Param
extern unsigned PartNum;
extern float SpaceUnitDim;
extern float ExtraUnitDim;
/// Growth Param
#define GEN_COUNT 18
extern unsigned GrownStep;
#define MAX_INTERNODES (262114)
// Diameter control
// when calculating diameters - (d^n = d1^n + d2^n),
// how much the terminal node occupies (d1)
#define T_NODE_D_RATIO 0.6
// Barrier Count
#define BARRIER_COUNT 3
extern int iRenderBud;
extern int iShowCellSpaceStatus;
extern int iShowCellShadow;
extern int iRenderGroundShadow;
// LIGHT PARAM
#define LAMDA 0.3
// SMOOTH SHADOW - how fine the smoothed shadow will be
#define SMOOTH_GRAN (0.05)
#define SMOOTH_THREAD_DIM 256
#define SMOOTH_BLOCK_DIM ( (SCENESIZE * 2 / SMOOTH_GRAN) * (SCENESIZE * 2 / SMOOTH_GRAN) / SMOOTH_THREAD_DIM)
#endif