class Graphene::Vec4

Overview

A structure capable of holding a vector with four dimensions: x, y, z, and w.

The contents of the #graphene_vec4_t structure are private and should never be accessed directly.

Defined in:

auto/graphene-1.0/vec4.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.alloc : self #

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

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

Class Method Detail

def self.g_type : UInt64 #

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


def self.one : Graphene::Vec4 #

def self.w_axis : Graphene::Vec4 #

def self.x_axis : Graphene::Vec4 #

def self.y_axis : Graphene::Vec4 #

def self.z_axis : Graphene::Vec4 #

def self.zero : Graphene::Vec4 #

Instance Method Detail

def ==(other : self) : Bool #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.



def divide(b : Graphene::Vec4) : Graphene::Vec4 #

def dot(b : Graphene::Vec4) : Float32 #

def equal(v2 : Graphene::Vec4) : Bool #

def finalize #

def free : Nil #

def init(x : Float32, y : Float32, z : Float32, w : Float32) : Graphene::Vec4 #

def init_from_float(src : Enumerable(Float32)) : Graphene::Vec4 #

def init_from_float(*src : Float32) #

def init_from_vec2(src : Graphene::Vec2, z : Float32, w : Float32) : Graphene::Vec4 #

def init_from_vec3(src : Graphene::Vec3, w : Float32) : Graphene::Vec4 #

def init_from_vec4(src : Graphene::Vec4) : Graphene::Vec4 #

def interpolate(v2 : Graphene::Vec4, factor : Float64) : Graphene::Vec4 #

def length : Float32 #



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

def near(v2 : Graphene::Vec4, epsilon : Float32) : Bool #

def negate : Graphene::Vec4 #

def normalize : Graphene::Vec4 #

def scale(factor : Float32) : Graphene::Vec4 #

def subtract(b : Graphene::Vec4) : Graphene::Vec4 #

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

def to_float(*dest : Float32) #

def to_unsafe : Pointer(Void) #

def value : Graphene::Simd4F #

def value=(value : Graphene::Simd4F) #

def w : Float32 #

def x : Float32 #

def xy : Graphene::Vec2 #

def xyz : Graphene::Vec3 #

def y : Float32 #

def z : Float32 #