Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/benanders/Hosek-Wilkie
/ functions
Functions
43 in github.com/benanders/Hosek-Wilkie
⨍
Functions
43
◇
Types & classes
8
↓ 10 callers
Function
evaluate
(dataset: &[f32], stride: usize, turbidity: f32, albedo: f32, sun_theta: f32)
src/main.rs:232
↓ 4 callers
Function
evaluate_spline
(dataset: &[f32], start: usize, stride: usize, value: f32)
src/main.rs:223
↓ 4 callers
Method
uniform
Returns the location of a uniform.
src/shader.rs:177
↓ 3 callers
Function
clamp
(value: T, min: T, max: T)
src/main.rs:283
↓ 3 callers
Function
clamp
Restrict a value to a range.
src/player.rs:84
↓ 3 callers
Method
is_key_down
Returns true if a key is held down.
src/input.rs:79
↓ 3 callers
Method
update_view
Updates the camera's view matrix.
src/camera.rs:139
↓ 2 callers
Method
attach
Attaches a shader to the program.
src/shader.rs:111
↓ 2 callers
Method
error_message
Returns the shader's compilation error message, if compilation failed.
src/shader.rs:65
↓ 2 callers
Function
exp
(vec: Vector3<f32>)
src/main.rs:301
↓ 2 callers
Method
has_error
Returns true if an error occurred during compilation.
src/shader.rs:53
↓ 2 callers
Function
recalc_sun
(sun_pos: Vector2<f32>)
src/main.rs:174
↓ 2 callers
Method
update
Called once a frame to update state.
src/input.rs:172
↓ 2 callers
Method
update_axes
Update the camera's axes relative to the look direction.
src/camera.rs:108
↓ 2 callers
Method
update_orientation
Updates the camera's orientation matrix.
src/camera.rs:130
↓ 1 callers
Method
attr
Returns the location of an attribute.
src/shader.rs:171
↓ 1 callers
Method
bind
Binds the shader program.
src/shader.rs:166
↓ 1 callers
Method
compile
Compiles the shader.
src/shader.rs:41
↓ 1 callers
Method
handle_event
Called when an event occurs to update state.
src/input.rs:159
↓ 1 callers
Function
hosek_wilkie
(cos_theta: f32, gamma: f32, cos_gamma: f32, params: &[Vector3<f32>])
src/main.rs:252
↓ 1 callers
Method
key
Called when a key is pressed or released.
src/input.rs:133
↓ 1 callers
Method
link
Links the shader program, panicing if an error occurs. TODO: Don't panic
src/shader.rs:117
↓ 1 callers
Method
look
Rotates the camera by a certain amount along each axis.
src/camera.rs:148
↓ 1 callers
Function
min
(value: T, min: T)
src/main.rs:293
↓ 1 callers
Method
motion_vector
Calculates the player's movement direction from which keys are held down.
src/player.rs:63
↓ 1 callers
Method
mouse
Called when the mouse is pressed or released.
src/input.rs:143
↓ 1 callers
Method
mouse_delta
Returns the most recent mouse delta.
src/input.rs:74
↓ 1 callers
Method
mouse_move
Called when the mouse moves.
src/input.rs:117
↓ 1 callers
Function
powv
(a: Vector3<f32>, b: Vector3<f32>)
src/main.rs:279
↓ 1 callers
Function
set_attr
Set a vertex attribute. Assumes the appropriate VAO, VBO, and shader are bound.
src/shader.rs:191
↓ 1 callers
Method
update_projection
Update the camera's projection matrix.
src/camera.rs:98
↓ 1 callers
Method
walk
Moves the camera around by a certain amount along each axis.
src/camera.rs:168
↓ 1 callers
Method
window_is_open
Returns true as long as the main window is open.
src/input.rs:112
Method
drop
(&mut self)
src/shader.rs:94
Method
from_glutin
Convert from a glutin mouse button.
src/input.rs:194
Method
is_mouse_down
Returns true if a mouse button is held down.
src/input.rs:90
Function
main
()
src/main.rs:54
Method
new
Creates a new camera, in a window with the given dimensions.
src/camera.rs:70
Method
new
Creates a new input handler, using the window's dimensions.
src/input.rs:56
Method
new
Create a new player object.
src/player.rs:40
Method
new
Create a new shader, compiling the given source code. Panics if shader compilation fails. TODO: Not panic when compilation fails, but create a custom
src/shader.rs:27
Method
update
Called every frame to update the player's motion.
src/player.rs:47
Method
was_mouse_pressed
Returns true if a mouse button was just pressed.
src/input.rs:101