class

RayTracer::Matrix

Inherits RayTracer::Tuple < Reference < Object

Constants

IDENTITY_4 = identity(4)

Constructors

new(tuple : Tuple::TUPLE, column = true)
Source

Class methods

identity(size)
Source
rotation_x(r)
Source
rotation_y(r)
Source
rotation_z(r)
Source
scaling(x, y, z)
Source
shearing(x_y, x_z, y_x, y_z, z_x, z_y)
Source
translation(x, y, z)
Source
view_transform(from : TUPLE, to : TUPLE, up : TUPLE)
Source

Instance methods

*(other : Matrix)
Source
*(tuple : Tuple::TUPLE)
Source
==(other)

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

Source
[](row, col)
Source
cofactor(row, col)
Source
col(num)
Source
cols
Source
determinant
Source
inverse
Source
invertable?
Source
minor(row, col)
Source
rotation_x(r)
Source
rotation_y(r)
Source
rotation_z(r)
Source
row(num)
Source
rows
Source
scaling(x, y, z)
Source
shearing(x_y, x_z, y_x, y_z, z_x, z_y)
Source
size
Source
submatrix(row, col)
Source
to_s(io : IO)

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Source
translation(x, y, z)

Fluent transforms

Source
transpose
Source