Class: Carbuncle::Vector3

Inherits:
Object show all
Extended by:
Carbuncle::Vectorizable::ClassMethods
Includes:
Vectorizable
Defined in:
gems/carbuncle-math/mrblib/vector3.rb,
gems/carbuncle-math/mrblib/000-vectorizable.rb

Overview

Represents a point in three dimensional space.

Constant Summary

Constants included from Vectorizable

Carbuncle::Vectorizable::CLASS

Constants included from Enumerable

Enumerable::NONE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Carbuncle::Vectorizable::ClassMethods

vectorize_properties

Methods included from Vectorizable

#%, #*, #**, #+, #-, #-@, #/, #<<, #>>, #[], #[]=, #each, #length, #to_s

Methods included from Enumerable

__update_hash, #all?, #any?, #chain, #collect, #count, #cycle, #detect, #drop, #drop_while, #each_cons, #each_slice, #each_with_index, #each_with_object, #entries, #filter_map, #find_all, #find_index, #first, #flat_map, #grep, #group_by, #hash, #include?, #inject, #lazy, #max, #max_by, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reject, #reverse_each, #sort, #sort_by, #sum, #take, #take_while, #tally, #to_h, #uniq, #zip

Instance Attribute Details

#x ⇒ Float

The x value of the vector.

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#xy ⇒ Carbuncle::Point

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#xyz ⇒ Carbuncle::Vector3

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#xz ⇒ Carbuncle::Point

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#xzy ⇒ Carbuncle::Vector3

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#y ⇒ Float

The y value of the vector.

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#yx ⇒ Carbuncle::Point

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#yxz ⇒ Carbuncle::Vector3

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#yz ⇒ Carbuncle::Point

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#yzx ⇒ Carbuncle::Vector3

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#z ⇒ Float

The z value of the vector.

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#zx ⇒ Carbuncle::Point

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#zxy ⇒ Carbuncle::Vector3

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#zy ⇒ Carbuncle::Point

Returns:



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

Instance Method Details

#inspect ⇒ Object



45
46
47
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 45

def inspect
  "Vector3(#{x}, #{y}, #{z})"
end

#size ⇒ Object



49
50
51
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 49

def size
  3
end

#to_a ⇒ Object



53
54
55
# File 'gems/carbuncle-math/mrblib/vector3.rb', line 53

def to_a
  [x, y, z]
end