struct Graphene::Matrix

Overview

A structure capable of holding a 4x4 matrix.

The contents of the #graphene_::matrix_t structure are private and should never be accessed directly.

Defined in:

lib/gi-crystal/src/auto/graphene-1.0/matrix.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pointer : Pointer(Void), transfer : GICrystal::Transfer) #

def self.new(data : LibGraphene::Matrix, _transfer : GICrystal::Transfer) #

def self.new(value : Graphene::Simd4X4F? = nil) #

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


Instance Method Detail

def ==(other : self) : Bool #

def decompose : Graphene::Vec3 #

def determinant : Float32 #

def equal(b : Graphene::Matrix) : Bool #

def equal_fast(b : Graphene::Matrix) : Bool #

def free : Nil #

def init_from_2d(xx : Float64, yx : Float64, xy : Float64, yy : Float64, x_0 : Float64, y_0 : Float64) : Graphene::Matrix #

def init_from_float(v : Enumerable(Float32)) : Graphene::Matrix #

def init_from_float(*v : Float32) #

def init_from_matrix(src : Graphene::Matrix) : Graphene::Matrix #

def init_from_vec4(v0 : Graphene::Vec4, v1 : Graphene::Vec4, v2 : Graphene::Vec4, v3 : Graphene::Vec4) : Graphene::Matrix #

def init_frustum(left : Float32, right : Float32, bottom : Float32, top : Float32, z_near : Float32, z_far : Float32) : Graphene::Matrix #

def init_identity : Graphene::Matrix #

def init_look_at(eye : Graphene::Vec3, center : Graphene::Vec3, up : Graphene::Vec3) : Graphene::Matrix #

def init_ortho(left : Float32, right : Float32, top : Float32, bottom : Float32, z_near : Float32, z_far : Float32) : Graphene::Matrix #

def init_perspective(fovy : Float32, aspect : Float32, z_near : Float32, z_far : Float32) : Graphene::Matrix #

def init_rotate(angle : Float32, axis : Graphene::Vec3) : Graphene::Matrix #

def init_scale(x : Float32, y : Float32, z : Float32) : Graphene::Matrix #

def init_skew(x_skew : Float32, y_skew : Float32) : Graphene::Matrix #

def init_translate(p : Graphene::Point3D) : Graphene::Matrix #

def interpolate(b : Graphene::Matrix, factor : Float64) : Graphene::Matrix #

def inverse : Graphene::Matrix #

def is_2d : Bool #

def is_backface_visible : Bool #

def is_identity : Bool #

def is_singular : Bool #

def multiply(b : Graphene::Matrix) : Graphene::Matrix #

def near(b : Graphene::Matrix, epsilon : Float32) : Bool #

def normalize : Graphene::Matrix #

def perspective(depth : Float32) : Graphene::Matrix #

def print : Nil #

def project_point(p : Graphene::Point) : Graphene::Point #

def project_rect(r : Graphene::Rect) : Graphene::Quad #

def project_rect_bounds(r : Graphene::Rect) : Graphene::Rect #

def rotate(angle : Float32, axis : Graphene::Vec3) : Nil #

def rotate_euler(e : Graphene::Euler) : Nil #

def rotate_quaternion(q : Graphene::Quaternion) : Nil #

def rotate_x(angle : Float32) : Nil #

def rotate_y(angle : Float32) : Nil #

def rotate_z(angle : Float32) : Nil #

def row(index_ : UInt32) : Graphene::Vec4 #

def scale(factor_x : Float32, factor_y : Float32, factor_z : Float32) : Nil #

def skew_xy(factor : Float32) : Nil #

def skew_xz(factor : Float32) : Nil #

def skew_yz(factor : Float32) : Nil #

def to_2d(xx : Float64, yx : Float64, xy : Float64, yy : Float64, x_0 : Float64, y_0 : Float64) : Bool #

def to_float(v : Enumerable(Float32)) : Nil #

def to_float(*v : Float32) #

def transform_bounds(r : Graphene::Rect) : Graphene::Rect #

def transform_box(b : Graphene::Box) : Graphene::Box #

def transform_point(p : Graphene::Point) : Graphene::Point #

def transform_point3d(p : Graphene::Point3D) : Graphene::Point3D #

def transform_ray(r : Graphene::Ray) : Graphene::Ray #

def transform_rect(r : Graphene::Rect) : Graphene::Quad #

def transform_sphere(s : Graphene::Sphere) : Graphene::Sphere #

def transform_vec3(v : Graphene::Vec3) : Graphene::Vec3 #

def transform_vec4(v : Graphene::Vec4) : Graphene::Vec4 #

def translate(pos : Graphene::Point3D) : Nil #

def transpose : Graphene::Matrix #

def unproject_point3d(modelview : Graphene::Matrix, point : Graphene::Point3D) : Graphene::Point3D #

def untransform_bounds(r : Graphene::Rect, bounds : Graphene::Rect) : Graphene::Rect #

def untransform_point(p : Graphene::Point, bounds : Graphene::Rect) : Graphene::Point #

def value(row : UInt32, col : UInt32) : Float32 #

def value(*args, **options) #

def value(*args, **options, &) #

def value=(arg) #

def x_scale : Float32 #

def x_translation : Float32 #

def y_scale : Float32 #

def y_translation : Float32 #

def z_scale : Float32 #

def z_translation : Float32 #