class Hitable::Triangle

Direct Known Subclasses

Defined in:

hitables/triangle.cr

Constructors

Instance Method Summary

Instance methods inherited from class BoundedHitable

bounding_box : AABB bounding_box, bounding_box=(bounding_box : AABB) bounding_box=

Constructor methods inherited from class BoundedHitable

new new

Instance methods inherited from class Hitable

area : Float64 area, area_light : Light? area_light, area_light=(area_light : Light?) area_light=, hit(ray : Ray) : HitRecord? hit, pdf(point : Point, wi : Vector) : Float64
pdf(point : Point) : Float64
pdf
, rotate(axis : Vector, degrees : Float64) : Hitable rotate, rotate_x(degrees : Float64) : Hitable rotate_x, rotate_y(degrees : Float64) : Hitable rotate_y, rotate_z(degrees : Float64) : Hitable rotate_z, sample(origin) : ::Tuple(Point, Normal)
sample : ::Tuple(Point, Normal)
sample
, scale(size : Float64) : Hitable scale, translate(offset : Vector) : Hitable translate

Constructor Detail

def self.new(a, b, c, material, flipped = false) #

[View source]

Instance Method Detail

def a : Point #

[View source]
def b : Point #

[View source]
def barycentric_coordinates(p) #

[View source]
def c : Point #

[View source]
def edge1 : Vector #

[View source]
def edge2 : Vector #

[View source]
def get_normal(ray, point, u, v) #

[View source]
def get_uv(ray, point, u, v) #

[View source]
def hit(ray) #

Möller-Trumbore intersection algorithm


[View source]
def material : Material #

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

[View source]
def normal : Normal #

[View source]