class Graphene::Vec3

Overview

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

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

Defined in:

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

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

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::Vec3 #

def self.x_axis : Graphene::Vec3 #

def self.y_axis : Graphene::Vec3 #

def self.z_axis : Graphene::Vec3 #

def self.zero : Graphene::Vec3 #

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 cross(b : Graphene::Vec3) : Graphene::Vec3 #

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

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

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

def free : Nil #

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

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

def init_from_float(*src : Float32) #

def init_from_vec3(src : Graphene::Vec3) : Graphene::Vec3 #

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

def length : Float32 #



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

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

def negate : Graphene::Vec3 #

def normalize : Graphene::Vec3 #

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

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

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

def to_float(*dest : Float32) #

def to_unsafe #

def value : Graphene::Simd4F #

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

def x : Float32 #

def xy : Graphene::Vec2 #

def xy0 : Graphene::Vec3 #

def xyz0 : Graphene::Vec4 #

def xyz1 : Graphene::Vec4 #

def xyzw(w : Float32) : Graphene::Vec4 #

def y : Float32 #

def z : Float32 #