class Tres::Vector4

Defined in:

tres/math/vector4.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Tres::Vector

==(v) ==, [](index) [], []=(index, value) []=, add(v) add, add_scalar(s) add_scalar, add_vectors(a, b) add_vectors, angle_to(v) angle_to, ceil ceil, clamp(min, max) clamp, clamp_scalar(min, max) clamp_scalar, copy(v) copy, distance_to(v) distance_to, divide(v) divide, divide_scalar(s) divide_scalar, each_dimension(&) each_dimension, elements : Array(Float32) elements, elements=(elements : Array(Float32)) elements=, floor floor, from_array(array : Array(Float32), offset = 0) from_array, length length, length_sq length_sq, lerp(v, alpha) lerp, lerp_vectors(v1, v2, alpha) lerp_vectors, max(v) max, min(v) min, multiply(v) multiply, multiply_scalar(s) multiply_scalar, multiply_vectors(a, b) multiply_vectors, negate negate, normalize normalize, project_on_plane(plane_normal) project_on_plane, project_on_vector(vector) project_on_vector, reflect(normal) reflect, round round, round_to_zero round_to_zero, set(elements : Array(Float32)) set, set_length(l) set_length, sub(v) sub, sub_scalar(s) sub_scalar, sub_vectors(a, b) sub_vectors, to_a(array = [0_f32, 0_f32], offset = 0) to_a, to_array(array = [0_f32, 0_f32], offset = 0) to_array, to_s to_s

Constructor methods inherited from class Tres::Vector

new(elements : Array(Float32)) new

Constructor Detail

def self.new(x = 0, y = 0, z = 0, w = 1) #

[View source]

Class Method Detail

def self.dimensions #

[View source]
def self.elements #

[View source]

Instance Method Detail

def apply_matrix4(m) #

[View source]
def clone #

[View source]
def divide_scalar(scalar) #

[View source]
def dot(v) #

[View source]
def from_attribute(attribute, index, offset = 0) #

[View source]
def length_manhattan #

[View source]
def set(x, y, z, w) #

[View source]
def set_axis_angle_from_quaternion(q) #

[View source]
def set_axis_angle_from_rotation_matrix(m) #

[View source]
def w #

[View source]
def w=(value) #

[View source]
def x #

[View source]
def x=(value) #

[View source]
def y #

[View source]
def y=(value) #

[View source]
def z #

[View source]
def z=(value) #

[View source]