Top Level Namespace

Defined in:

Constant Summary

FOURPI = 4.0 * Math::PI
INV_FOURPI = 1.0 / FOURPI
INV_PI = 1.0 / Math::PI
INV_TWOPI = 1.0 / TWOPI
PI_OVER_FOUR = Math::PI / 4
PI_OVER_TWO = Math::PI / 2
RADIANTS = Math::PI / 180
TWOPI = 2.0 * Math::PI

TODO Use these constants everywhere

Method Summary

Macro Summary

Method Detail

def balance_heuristic(nf : Int32, f_pdf : Float64, ng : Int32, g_pdf : Float64) #

[View source]
def clamp(x, min, max) #

[View source]
def concentric_sample_disk(u1 : Float64 = rand, u2 : Float64 = rand) : ::Tuple(Float64, Float64) #

[View source]
def cosine_hemisphere_pdf(cos_theta : Float64) #

[View source]
def cosine_sample_hemisphere(u1 : Float64 = rand, u2 : Float64 = rand) : Vector #

[View source]
def max(a, b) #

[View source]
def min(a, b) #

[View source]
def minmax(a, b) #

[View source]
def mix(a, b, t) #

[View source]
def power_heuristic(nf : Int32, f_pdf : Float64, ng : Int32, g_pdf : Float64) #

[View source]
def radiants(n) #

[View source]
def random #

[View source]
def same_hemisphere?(v1, v2) #

[View source]
def sign(x : Float64) #

[View source]
def smoothstep(x) #

[View source]
def solve_quadratic(a, b, c) : ::Tuple(Float64, Float64)? #

[View source]
def stratified_sample_1D(nx : Int32, jitter = true) #

TODO this is a litte bit different in pbrt


[View source]
def stratified_sample_2D(nx : Int32, ny : Int32, jitter = true) #

TODO this is a litte bit different in pbrt


[View source]
def uniform_hemisphere_pdf #

[View source]
def uniform_sample_disk(u1 : Float64 = rand, u2 : Float64 = rand) : ::Tuple(Float64, Float64) #

[View source]
def uniform_sample_hemisphere(u1 : Float64 = rand, u2 : Float64 = rand) #

[View source]
def uniform_sample_sphere(u1 : Float64 = rand, u2 : Float64 = rand) #

[View source]
def uniform_sphere_pdf #

[View source]

Macro Detail

macro assert(pred) #

[View source]
macro assert(pred, message) #

[View source]