class Prism::Maths::Matrix4f

Defined in:

prism/maths/matrix4f.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(matrix : Matrix(Float32)) #

[View source]
def self.new #

[View source]

Instance Method Detail

def *(other : Matrix4f) #

[View source]
def [](row : Int, column : Int) #

Retrieves the element at the given row and column indexes.


[View source]
def []=(row : Int, column : Int, value : Float32) #

[View source]
def as_array #

[View source]
def init_identity #

[View source]
def init_orthographic(left : Float32, right : Float32, bottom : Float32, top : Float32, near : Float32, far : Float32) : Matrix4f #

[View source]
def init_perspective(fov : Float32, aspect_ratio : Float32, z_near : Float32, z_far : Float32) #

[View source]
def init_rotation(x : Float32, y : Float32, z : Float32) #

[View source]
def init_rotation(forward : Vector3f, up : Vector3f, right : Vector3f) #

[View source]
def init_rotation(forward : Vector3f, up : Vector3f) #

[View source]
def init_scale(x : Float32, y : Float32, z : Float32) #

[View source]
def init_translation(x : Float32, y : Float32, z : Float32) #

Turns the matrix into a translation matrix


[View source]
def m #

[View source]
def to_s(io : IO) #
Description copied from class Reference

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>

[View source]
def transform(r : Vector3f) : Vector3f #

[View source]