struct CrystalEdge::Vector3

Defined in:

crystaledge/quaternion.cr
crystaledge/vector3.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(x : Float64, y : Float64, z : Float64) #

[View source]
def self.new(matrix : Matrix(Float64, N, M)) forall N, M #

[View source]
def self.new(angle : Vector3, length : Float64 = 1.0) #

[View source]

Class Method Detail

def self.zero #

Zero vector


[View source]

Instance Method Detail

def !=(other : Vector3) #

[View source]
def %(other : Vector3) #

[View source]
def *(other : Vector3) #

[View source]
def *(other : Float64) #

[View source]
def **(other : Vector3) #

[View source]
def +(other : Vector3) #

[View source]
def +(other : Float64) #

[View source]
def -(other : Vector3) #

[View source]
def -(other : Float64) #

[View source]
def - #

[View source]
def /(other : Vector3) #

[View source]
def /(other : Float64) #

[View source]
def ==(other : self) #

[View source]
def angle(other : Vector3) #

[View source]
def angle #

[View source]
def clone #

[View source]
def clone(&b) #

[View source]
def cross(other : Vector3) #

Cross product


[View source]
def distance(other : Vector3) #

[View source]
def dot(other : Vector3) #

Dot product


[View source]
def find_normal_axis(other : Vector3) #

[View source]
def heading #

[View source]
def magnitude #

[View source]
def normalize #

[View source]
def normalize! #

[View source]
def reflect(q : Quaternion) #

[View source]
def rotate(euler : Vector3) #

[View source]
def rotate(q : Quaternion) #

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]
def values #

[View source]
def x : Float64 #

[View source]
def x=(x : Float64) #

[View source]
def y : Float64 #

[View source]
def y=(y : Float64) #

[View source]
def z : Float64 #

[View source]
def z=(z : Float64) #

[View source]
def zero! #

[View source]