Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Twinklebear/tray_rust
/ functions
Functions
483 in github.com/Twinklebear/tray_rust
⨍
Functions
483
◇
Types & classes
105
↓ 64 callers
Method
at
Evaulate the ray equation at some t value and return the point returns result of `self.o + t * self.d`
src/linalg/ray.rs:43
↓ 46 callers
Method
len
Get the length of the queue
src/sampler/block_queue.rs:61
↓ 44 callers
Method
iter
(&self)
src/geometry/bvh.rs:131
↓ 35 callers
Function
dot
Compute the dot product of two vectors
src/linalg/mod.rs:42
↓ 30 callers
Method
normalized
Get a normalized copy of this normal
src/linalg/normal.rs:33
↓ 23 callers
Function
mat_error
Generate a material loading error string
src/scene.rs:397
↓ 21 callers
Function
cos_theta
Compute the value of cosine theta for a vector in shading space
src/bxdf/mod.rs:125
↓ 21 callers
Method
is_black
Check if the color is black
src/film/color.rs:47
↓ 19 callers
Method
at_mut
Mutably access the element at row `i` column `j`
src/linalg/matrix4.rs:34
↓ 19 callers
Function
clamp
Clamp `x` to be between `min` and `max`
src/linalg/mod.rs:51
↓ 15 callers
Function
lerp
Lerp between `a` and `b` at some distance `t` where t is in [0, 1] and t = 0 returns `a` and t = 1 returns `b`
src/linalg/mod.rs:47
↓ 14 callers
Method
dimensions
(&self)
src/film/image.rs:68
↓ 11 callers
Method
clear
Clear the render target to black
src/film/render_target.rs:167
↓ 11 callers
Method
find_color
Get a Color texture, if it's in the map by loading from the element. If the element is a string the teture name will be looked up, if not a constant t
src/scene.rs:57
↓ 11 callers
Method
sample_color
(&self, _: f32, _: f32, _: f32)
src/texture/mod.rs:55
↓ 10 callers
Function
cross
Compute the cross product of two vectors
src/linalg/mod.rs:38
↓ 9 callers
Method
at
Access the element at row `i` column `j`
src/linalg/matrix4.rs:30
↓ 9 callers
Method
position
Get the position at some time
src/geometry/animated_mesh.rs:70
↓ 9 callers
Function
to_radians
Convert value in degrees to radians TODO: See where `f32::to_radians` ends up, if it gets stabilized into Rust switch back to it
src/linalg/mod.rs:34
↓ 8 callers
Method
length_sqr
Compute the squared length of the normal
src/linalg/normal.rs:25
↓ 8 callers
Method
next
Get the next block in the queue or None if the queue is finished
src/sampler/block_queue.rs:52
↓ 8 callers
Method
point_union
Get a box that contains the passed point, by expanding this box to reach the point
src/geometry/bbox.rs:39
↓ 8 callers
Function
same_hemisphere
Check if two vectors are in the same hemisphere in shading space
src/bxdf/mod.rs:166
↓ 7 callers
Method
get_samples_2d
(&mut self, samples: &mut [(f32, f32)], rng: &mut StdRng)
src/sampler/ld.rs:54
↓ 7 callers
Method
iter
Return an iterator over the matrix's elements. The iterator goes row by row through the matrix.
src/linalg/matrix4.rs:175
↓ 7 callers
Method
max_spp
(&self)
src/sampler/ld.rs:65
↓ 6 callers
Method
box_union
Get a box representing the union of this box with the one passed
src/geometry/bbox.rs:31
↓ 6 callers
Method
find_scalar
Get a scalar texture, if it's in the map by loading from the element. If the element is a string the teture name will be looked up, if not a constant
src/scene.rs:77
↓ 6 callers
Method
get_samples_1d
(&mut self, samples: &mut [f32], rng: &mut StdRng)
src/sampler/ld.rs:60
↓ 6 callers
Method
intersect
Traverse the BVH and call the function passed on the objects in the leaf nodes of the BVH, returning the value returned by the function after traversa
src/geometry/bvh.rs:81
↓ 6 callers
Method
is_empty
Check if the queue is empty
src/sampler/block_queue.rs:63
↓ 6 callers
Method
luminance
Compute the luminance of the color
src/film/color.rs:43
↓ 6 callers
Method
sample_f32
(&self, _: f32, _: f32, _: f32)
src/texture/mod.rs:52
↓ 6 callers
Function
sin_theta
Compute the value of sine theta for a vector in shading space
src/bxdf/mod.rs:131
↓ 6 callers
Method
transform
Return the transformation stored for this keyframe
src/linalg/keyframe.rs:60
↓ 5 callers
Method
distance_sqr
Compute the squared distance between this point and another
src/linalg/point.rs:27
↓ 5 callers
Method
to_shading
Transform the vector from world space to shading space
src/bxdf/bsdf.rs:52
↓ 5 callers
Method
transpose
Compute and return the transpose of this matrix
src/linalg/matrix4.rs:38
↓ 4 callers
Method
block_dim
Get the dimensions of an individual block in the queue
src/sampler/block_queue.rs:48
↓ 4 callers
Method
bxdf_type
(&self)
src/bxdf/merl.rs:41
↓ 4 callers
Method
eval
Evaluate the BSDF for the outgoing and incident light directions `w_o` and `w_i` in world space, sampling the desired subset of BxDFs selected by the
src/bxdf/bsdf.rs:66
↓ 4 callers
Method
fresnel
(&self, cos_i: f32)
src/bxdf/fresnel.rs:50
↓ 4 callers
Method
has_samples
(&self)
src/sampler/ld.rs:66
↓ 4 callers
Method
inverse
Compute and return the inverse of this matrix
src/linalg/matrix4.rs:48
↓ 4 callers
Function
load_vector
Load a vector from the JSON element passed. Returns None if the element did not contain a valid vector (eg. [1.0, 2.0, 0.5])
src/scene.rs:658
↓ 4 callers
Method
matches
Check if this BxDF matches the type flags passed
src/bxdf/mod.rs:111
↓ 4 callers
Method
partial_cmp
(&self, other: &ColorKeyframe)
src/film/animated_color.rs:26
↓ 4 callers
Method
radiance
Return the radiance emitted by the light in the direction `w` from point `p` on the light's surface with normal `n`
src/geometry/emitter.rs:140
↓ 4 callers
Method
sample
Sample a component of the BSDF to get an incident light direction for light leaving the surface along `w_o`. `samples` are the 3 random values to use
src/bxdf/bsdf.rs:85
↓ 3 callers
Method
active_keyframes
Get the active indices in the buffers for some time
src/geometry/animated_mesh.rs:55
↓ 3 callers
Method
animation_bounds
Compute the bounds of the box moving through the animation sequence by sampling time
src/linalg/animated_transform.rs:58
↓ 3 callers
Method
bsdf
(&'a self, hit: &Intersection<'a, 'b>, alloc: &'c Allocator)
src/material/merl.rs:88
↓ 3 callers
Method
child
Create a child ray from the parent starting at `o` and heading in `d`
src/linalg/ray.rs:34
↓ 3 callers
Method
clamp
Clamp the color values between [0, 1]
src/film/color.rs:36
↓ 3 callers
Function
cos_phi
Compute the value of cosine phi for a vector in shading space
src/bxdf/mod.rs:148
↓ 3 callers
Method
eta_for_interaction
Convenience method for getting `eta_i` and `eta_t` in the right order for if we're entering or exiting this material based on the direction of the out
src/bxdf/microfacet_transmission.rs:34
↓ 3 callers
Method
generate_ray
Generate a ray from the camera through the pixel `px`
src/film/camera.rs:150
↓ 3 callers
Method
get_region
(&self)
src/sampler/ld.rs:71
↓ 3 callers
Method
get_render
Convert the floating point color buffer to 24bpp sRGB for output to an image
src/film/render_target.rs:185
↓ 3 callers
Method
get_samples
(&mut self, samples: &mut Vec<(f32, f32)>, rng: &mut StdRng)
src/sampler/ld.rs:33
↓ 3 callers
Method
height
(&self)
src/film/filter/gaussian.rs:38
↓ 3 callers
Method
illumination
(&self, scene: &Scene, light_list: &[&Emitter], r: &Ray, hit: &Intersection, sampler: &mut
src/integrator/path.rs:45
↓ 3 callers
Method
inv_mul_point
Multiply the point by the inverse transformation TODO: These inverse mults are a bit hacky since Rust doesn't currently have function overloading, cle
src/linalg/transform.rs:150
↓ 3 callers
Method
iter
Get an iterator to work through the queue
src/sampler/block_queue.rs:50
↓ 3 callers
Function
load_color
Load a color from the JSON element passed. Returns None if the element did not contain a valid color.
src/scene.rs:698
↓ 3 callers
Function
load_transform
Load a transform stack specified by the element. Will panic on invalidly specified transforms and log the error.
src/scene.rs:751
↓ 3 callers
Method
normal
Get the normal at some time
src/geometry/animated_mesh.rs:82
↓ 3 callers
Method
normal_distribution
(&self, w_h: &Vector)
src/bxdf/microfacet/ggx.rs:27
↓ 3 callers
Method
pdf
Compute the pdf for sampling the pair of incident and outgoing light directions for the BxDFs matching the flags set
src/bxdf/bsdf.rs:114
↓ 3 callers
Method
select_block
(&mut self, start: (u32, u32))
src/sampler/ld.rs:68
↓ 3 callers
Method
select_region
Select a new region starting at region indices `start` with the same dimensions eg. with blocks of width 8 the 2nd region along x is at 16 so to get t
src/sampler/mod.rs:90
↓ 3 callers
Function
sin_phi
Compute the value of sine phi for a vector in shading space
src/bxdf/mod.rs:157
↓ 3 callers
Function
sin_theta_sqr
Compute the value of (sine theta)^2 for a vector in shading space
src/bxdf/mod.rs:129
↓ 3 callers
Method
surface_area
Compute the surface area of the box
src/geometry/bbox.rs:67
↓ 3 callers
Function
tan_theta
Compute the value of tan theta for a vector in shading space
src/bxdf/mod.rs:133
↓ 3 callers
Method
texcoord
Get the texture coordinate at some time
src/geometry/animated_mesh.rs:94
↓ 3 callers
Method
width
(&self)
src/film/filter/gaussian.rs:36
↓ 3 callers
Method
write
Write all the image samples to the render target
src/film/render_target.rs:77
↓ 2 callers
Method
active_keyframes
(&self, time: f32)
src/texture/animated_image.rs:19
↓ 2 callers
Function
bilinear_interpolate
(x: f32, y: f32, get: F)
src/texture/mod.rs:22
↓ 2 callers
Method
bounds
(&self, _: f32, _: f32)
src/geometry/bvh.rs:271
↓ 2 callers
Method
cmp
(&self, other: &ColorKeyframe)
src/film/animated_color.rs:21
↓ 2 callers
Method
color
Compute the color at the desired time
src/film/animated_color.rs:52
↓ 2 callers
Function
concentric_sample_disk
Compute concentric sample positions on a unit disk mapping input from range [0, 1) to sample positions on a disk `samples` should be two random sample
src/mc.rs:23
↓ 2 callers
Function
coordinate_system
Compute a local ortho-normal coordinate system from a single vector.
src/linalg/mod.rs:96
↓ 2 callers
Function
cos_theta_sqr
Compute the value of cosine^2 theta for a vector in shading space
src/bxdf/mod.rs:127
↓ 2 callers
Method
delta_light
(&self)
src/geometry/emitter.rs:187
↓ 2 callers
Function
dot
Compute the dot product of the two quaternions
src/linalg/quaternion.rs:96
↓ 2 callers
Method
intersect
Test the ray for intersections against the objects in the scene. Returns Some(Intersection) if an intersection was found and None if not.
src/scene.rs:148
↓ 2 callers
Function
intersect_triangle
(geom: &'a G, ray: &mut Ray, pa: &Point, pb: &Point, pc: &Point,
src/geometry/mesh.rs:136
↓ 2 callers
Method
inv_mul_ray
Multiply the ray with the inverse transformation
src/linalg/transform.rs:183
↓ 2 callers
Method
inv_mul_vector
Multiply the vector with the inverse transformation
src/linalg/transform.rs:165
↓ 2 callers
Method
inverse
Return the inverse of the transformation
src/linalg/transform.rs:137
↓ 2 callers
Method
length
Compute the length of the normal
src/linalg/normal.rs:29
↓ 2 callers
Function
load_keyframes
Load a list of keyframes specified by the element. Will panic on invalidly specified keyframes or transforms and log the error
src/scene.rs:825
↓ 2 callers
Function
load_point
Load a point from the JSON element passed. Returns None if the element did not contain a valid point (eg. [1.0, 2.0, 0.5])
src/scene.rs:678
↓ 2 callers
Method
monodir_shadowing
Monodirectional shadowing function from Walter et al., we use the Smith shadowing-masking which uses the reciprocity of this function. `w` is the inci
src/bxdf/microfacet/beckmann.rs:56
↓ 2 callers
Method
monodir_shadowing
Monodirectional shadowing function from Walter et al., we use the Smith shadowing-masking which uses the reciprocity of this function. `w` is the inci
src/bxdf/microfacet/ggx.rs:53
↓ 2 callers
Function
morton2
Compute the Morton code for the `(x, y)` position
src/sampler/morton.rs:18
↓ 2 callers
Method
normalized
Get the normalized quaternion for this rotation
src/linalg/quaternion.rs:90
next →
1–100 of 483, ranked by callers