class RayTracer::Shape

Included Modules

Direct Known Subclasses

Defined in:

ray_tracer/shape.cr

Constructors

Instance Method Summary

Instance methods inherited from module RayTracer::Tuple

add(a1 : TUPLE, a2 : TUPLE) add, cross(a1 : TUPLE, a2 : TUPLE) cross, divide(a : TUPLE, s : Float64) divide, dot(a1 : TUPLE, a2 : TUPLE) dot, magnitude(a : TUPLE) magnitude, multiply(a : TUPLE, s : Float64) multiply, negate(a : TUPLE) negate, normalize(a : TUPLE) normalize, point(x : Float64, y : Float64, z : Float64) point, point?(tuple : TUPLE) point?, reflect(v : TUPLE, n : TUPLE) reflect, subtract(a1 : TUPLE, a2 : TUPLE) subtract, tuple(x : Float64, y : Float64, z : Float64, w : Float64)
tuple(vals : Array(Float64))
tuple
, vector(x : Float64, y : Float64, z : Float64) vector, vector?(tuple : TUPLE) vector?

Constructor Detail

def self.new(transform : RayTracer::Matrix = Matrix::IDENTITY_4, material : RayTracer::Material = Material.new) #

[View source]

Instance Method Detail

def ==(other) #
Description copied from class Reference

Returns false (other can only be a Value here).


[View source]
def intersect(ray : Ray) : Intersections #

[View source]
def inverse_transform : Matrix #

[View source]
def local_intersect(ray : Ray) : Intersections #

[View source]
def local_normal_at(point : TUPLE) #

[View source]
def material : RayTracer::Material #

[View source]
def material=(material : RayTracer::Material) #

[View source]
def normal_at(point : TUPLE) #

[View source]
def transform : Matrix #

[View source]
def transform=(val : Matrix) #

[View source]
def transpose_inverse_transform : Matrix #

[View source]