Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ErisianArchitect/scratch
/ functions
Functions
131 in github.com/ErisianArchitect/scratch
⨍
Functions
131
◇
Types & classes
19
↓ 12 callers
Function
read_texture
(path: P)
src/cubemap.rs:126
↓ 12 callers
Method
set_with
(&mut self, x: i32, y: i32, z: i32, f: F)
src/chunk.rs:124
↓ 12 callers
Method
set_with_reflection
(&mut self, x: i32, y: i32, z: i32, f: F)
src/chunk.rs:130
↓ 10 callers
Method
get
(&self, pos: Vec3A)
src/main.rs:154
↓ 8 callers
Method
get
(&self, index: usize)
src/perlin.rs:24
↓ 8 callers
Method
sample_uv
(&self, face: Face, u: f32, v: f32)
src/cubemap.rs:58
↓ 6 callers
Function
calc_t_max
(step: i32, cell_size: f32, p: f32, magnitude: f32)
src/math.rs:229
↓ 6 callers
Method
calculate
(&self, color: Vec3A, normal: Vec3A, occluded: bool)
src/main.rs:244
↓ 6 callers
Method
get
(&self, x: i32, y: i32, z: i32)
src/chunk.rs:25
↓ 6 callers
Method
push_unchecked
(&mut self, value: T)
src/instack.rs:23
↓ 6 callers
Method
raycast
(&self, ray: Ray3, max_distance: f32)
src/chunk.rs:186
↓ 6 callers
Method
rotate_vec
(&self, v: Vec3A)
src/camera.rs:128
↓ 5 callers
Function
aspect_ratio
(size: (u32, u32))
src/camera.rs:39
↓ 5 callers
Method
get_reflection
(&self, x: i32, y: i32, z: i32)
src/chunk.rs:47
↓ 4 callers
Method
calc_color_before_reflections
(&self, hit_point: Vec3A, hit_normal: Vec3A, hit_coord: IVec3)
src/main.rs:318
↓ 4 callers
Method
get_hit_point
(&self, ray: Ray3, face: Face)
src/chunk.rs:480
↓ 4 callers
Function
grad
(hash: usize, x: f32, y: f32)
src/perlin.rs:44
↓ 4 callers
Function
make_seed
(value: u64)
src/perlin.rs:11
↓ 4 callers
Method
normal
(self)
src/math.rs:35
↓ 4 callers
Method
pop_unchecked
(&mut self)
src/instack.rs:35
↓ 4 callers
Function
reflect
(ray_dir: Vec3A, normal: Vec3A)
src/main.rs:282
↓ 3 callers
Function
byte_scalar
(byte: u8)
src/math.rs:87
↓ 3 callers
Function
calc_step
(cell_size: f32, magnitude: f32)
src/math.rs:197
↓ 3 callers
Function
combine_reflection
(reflectivity: f32, diffuse: Vec3A, reflection: Vec3A)
src/main.rs:288
↓ 3 callers
Function
lerp
(a: f32, b: f32, t: f32)
src/perlin.rs:7
↓ 3 callers
Function
norm_u8
(norm: f32)
src/main.rs:166
↓ 3 callers
Method
quat
Returns the quaternion for the [Camera]'s rotation.
src/camera.rs:224
↓ 3 callers
Method
rotate_vec_y
Rotates vector around the Y axis.
src/camera.rs:134
↓ 3 callers
Function
rotation_from_direction
(direction: Vec3A)
src/camera.rs:12
↓ 3 callers
Function
scrunch
(value: f32)
src/math.rs:99
↓ 3 callers
Method
sky_color
(&self, ray_dir: Vec3A)
src/main.rs:572
↓ 3 callers
Method
translate
(&mut self, translation: Vec3A)
src/camera.rs:179
↓ 2 callers
Function
box_at
(start: (i32, i32, i32))
src/main.rs:727
↓ 2 callers
Function
fade
(t: f32)
src/perlin.rs:40
↓ 2 callers
Method
len
(&self)
src/instack.rs:41
↓ 2 callers
Method
projection_view_matrix
(&self)
src/camera.rs:251
↓ 2 callers
Function
rotation_from_look_at
(position: Vec3A, target: Vec3A)
src/camera.rs:7
↓ 2 callers
Method
set
(&mut self, x: i32, y: i32, z: i32, on: bool)
src/chunk.rs:62
↓ 2 callers
Method
set_reflection
(&mut self, x: i32, y: i32, z: i32, on: bool)
src/chunk.rs:77
↓ 1 callers
Method
apply
(&self, color: Vec3A, normal: Vec3A)
src/main.rs:199
↓ 1 callers
Method
calc_ray_dir
(self, ndc: Vec2)
src/main.rs:129
↓ 1 callers
Function
checkerboard
(x: i32, y: i32, z: i32)
src/main.rs:585
↓ 1 callers
Method
draw_box
(&mut self, start: (i32, i32, i32), end: (i32, i32, i32), on: bool)
src/chunk.rs:178
↓ 1 callers
Method
draw_box_reflection
(&mut self, start: (i32, i32, i32), end: (i32, i32, i32), on: bool)
src/chunk.rs:182
↓ 1 callers
Method
draw_box_with
(&mut self, start: (i32, i32, i32), end: (i32, i32, i32), f: F)
src/chunk.rs:136
↓ 1 callers
Method
draw_box_with_reflection
(&mut self, start: (i32, i32, i32), end: (i32, i32, i32), f: F)
src/chunk.rs:157
↓ 1 callers
Method
fill_box
(&mut self, start: (i32, i32, i32), end: (i32, i32, i32), on: bool)
src/chunk.rs:92
↓ 1 callers
Method
fill_box_reflection
(&mut self, start: (i32, i32, i32), end: (i32, i32, i32), on: bool)
src/chunk.rs:108
↓ 1 callers
Method
height
(&self)
src/cubemap.rs:20
↓ 1 callers
Method
index
(self, x: u32, y: u32)
src/main.rs:84
↓ 1 callers
Method
inv_index
(self, index: u32)
src/main.rs:90
↓ 1 callers
Function
next_start
(end: (i32, i32, i32))
src/main.rs:730
↓ 1 callers
Function
open_simplex_2d
(permutation: &Permutation, x: f32, y: f32)
src/open_simplex.rs:15
↓ 1 callers
Function
perlin
(permutation: &Permutation, x: f32, y: f32)
src/perlin.rs:51
↓ 1 callers
Method
point_on_ray
(&self, distance: f32)
src/ray.rs:39
↓ 1 callers
Function
print_f32_range
(range: std::ops::Range<f32>)
src/main.rs:227
↓ 1 callers
Method
projection_matrix
(&self)
src/camera.rs:247
↓ 1 callers
Function
raycast_scene
()
src/main.rs:589
↓ 1 callers
Function
rgb
(r: f32, g: f32, b: f32)
src/main.rs:171
↓ 1 callers
Method
rotation_matrix
(&self)
src/camera.rs:243
↓ 1 callers
Method
sample_dir
(&self, dir: Vec3A)
src/cubemap.rs:64
↓ 1 callers
Function
scrunch_factor
(cell_size: Vec3)
src/math.rs:104
↓ 1 callers
Function
scrunch_vector
(input: Vec3, cell_size: Vec3)
src/math.rs:112
↓ 1 callers
Method
trace_color
(&self, ray: Ray3, near: f32, far: f32)
src/main.rs:565
↓ 1 callers
Method
trace_reflections
Trace reflections for exact number of steps and calculate the color.
src/main.rs:512
↓ 1 callers
Method
translate_planar
For planar camera translation.
src/camera.rs:193
↓ 1 callers
Method
translate_rotated
Translates relative to camera rotation.
src/camera.rs:184
↓ 1 callers
Method
view_matrix
(&self)
src/camera.rs:236
↓ 1 callers
Method
width
(&self)
src/cubemap.rs:16
↓ 1 callers
Method
world_to_clip
(&self, pos: Vec3A)
src/camera.rs:255
↓ 1 callers
Method
y_quat
(&self)
src/camera.rs:232
Method
adv_move
(&mut self, move_type: MoveType, translation: Vec3A)
src/camera.rs:171
Method
at
Creates an unrotated camera at the given position.
src/camera.rs:64
Method
axis
(self)
src/math.rs:26
Method
backward
(&self)
src/camera.rs:159
Function
boxes
(start: (i32, i32, i32), chunk: &mut Chunk, rng: &mut StdRng)
src/main.rs:734
Method
calc_color_before_reflections_no_diffuse
(&self, hit_point: Vec3A, hit_normal: Vec3A)
src/main.rs:333
Method
calc_delta
(mag: f32)
src/chunk.rs:335
Method
calc_t_max
(step: i32, fract: f32, mag: f32)
src/chunk.rs:365
Method
col_index
(x: i32, z: i32)
src/chunk.rs:20
Method
down
(&self)
src/camera.rs:143
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/main.rs:70
Method
forward
(&self)
src/camera.rs:155
Method
from_direction
(dir: Vec3A)
src/math.rs:46
Method
from_files
(files: [P; 6])
src/cubemap.rs:46
Method
from_look_at
( position: Vec3A, target: Vec3A, fov: f32, z_near: f32, z_far: f32,
src/camera.rs:82
Method
from_look_to
`look_to` means to point in the same direction as the given `direction` vector.
src/camera.rs:103
Method
from_seed
(seed: [u8; 32])
src/perlin.rs:28
Method
from_target
(pos: Vec3A, target: Vec3A)
src/ray.rs:23
Method
get_with_scale
(&self, pos: Vec3A, scale: f64)
src/main.rs:145
Method
hit_cell
(coord: IVec3, distance: f32)
src/chunk.rs:471
Method
hit_face
(face: Face, coord: IVec3, distance: f32)
src/chunk.rs:462
Method
index
(self)
src/math.rs:80
Method
invert_dir
(self)
src/ray.rs:31
Method
iter_height
(self)
src/main.rs:100
Method
iter_width
(self)
src/main.rs:95
Method
left
(&self)
src/camera.rs:147
Method
look_at
(&mut self, target: Vec3A)
src/camera.rs:199
Method
look_to
(&mut self, direction: Vec3A)
src/camera.rs:203
Function
main
()
build.rs:1
next →
1–100 of 131, ranked by callers