forked from fogleman/Minecraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterrain.pxd
121 lines (87 loc) · 3.54 KB
/
terrain.pxd
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
116
117
118
119
120
121
import cython
cimport world
#cython: boundscheck=False
#cython: wraparound=False
#cython: cdivision=True
cdef class PerlinNoise(object):
cdef public:
list perm, weights
double PERSISTENCE, H
int OCTAVES
bint regen_weight
cdef double fade(self, double t)
cdef double lerp(self, double t, double a, double b)
@cython.locals(h=int, u=double, v=double)
cdef double grad(self, int hash, double x, double y, double z)
@cython.locals(X=int, Y=int, Z=int, u=double, v=double, w=double,
A=int, AA=int, AB=int, B=int, BA=int, BB=int)
cdef double noise(self, double x, double y, double z)
@cython.locals(total=double, n=int)
cpdef double fBm(self, double x, double y, double z)
cdef class TerrainGeneratorBase(object):
cdef public object seed
cpdef object generate_sector(self, sector)
cdef class TerrainGenerator(TerrainGeneratorBase):
cdef public:
PerlinNoise base_gen
PerlinNoise ocean_gen
PerlinNoise river_gen
PerlinNoise mount_gen
PerlinNoise hill_gen
PerlinNoise cave_gen
object biome_gen
cpdef object set_seed(self, object seed)
cpdef object generate_chunk(self, object chunk_x, object chunk_y,
object chunk_z)
cpdef object gen_inner_layer(self, object x, object y, object z, object c)
cpdef object gen_outer_layer(self, object x, object y, object z,
object first_block, object c,
object biome_type)
cpdef object lerp(self, object x, object x1, object x2, object v00,
object v01)
cpdef object tri_lerp(self, object x, object y, object z, object v000,
object v001, object v010, object v011, object v100,
object v101, object v110, object v111, object x1,
object x2, object y1, y2, object z1, object z2)
@cython.locals(x=int, y=int, z=int)
cpdef object tri_lerp_d_map(self, object d_map)
cpdef double _clamp(self, double a)
cpdef object density(self, object x, object y, object z)
cpdef object base_terrain(self, object x, object y)
cpdef object ocean_terrain(self, object x, object y)
cpdef object rive_terrain(self, object x, object y)
cpdef object mount_density(self, object x, object y, object z)
cpdef object hill_density(self, object x, object y, object z)
cpdef object cave_density(self, object x, object y, object z)
cdef class TerrainGeneratorSimple(TerrainGeneratorBase):
cdef public:
world.World world
object rand
object weights
object noise
bint skip_over
double PERSISTENCE
double H
int OCTAVES
int height_range
int height_base
int island_shore
int water_level
double zoom_level
tuple lowlevel_ores
tuple midlevel_ores
tuple highlevel_ores
tuple underwater_blocks
tuple world_type_trees
tuple world_type_plants
tuple world_type_grass
tuple island_type_grass
tuple leaf_blocks
set autogenerated_blocks
int negative_biome_trigger
cpdef double _clamp(self, double a)
@cython.locals(y=double, weight=double)
cpdef int get_height(self, double x, double z)
@cython.locals(world=world.World, islandheight=int, skip=bint, bx=int,
by=int, bz=int, bytop=int, x=int, z=int, y=int, yy=int)
cpdef object generate_sector(self, object sector)