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

#xFloat

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

#xyCarbuncle::Point

Returns:



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

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

#xyzCarbuncle::Vector3

Returns:



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

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

#xzCarbuncle::Point

Returns:



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

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

#xzyCarbuncle::Vector3

Returns:



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

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

#yFloat

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

#yxCarbuncle::Point

Returns:



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

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

#yxzCarbuncle::Vector3

Returns:



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

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

#yzCarbuncle::Point

Returns:



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

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

#yzxCarbuncle::Vector3

Returns:



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

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

#zFloat

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

#zxCarbuncle::Point

Returns:



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

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

#zxyCarbuncle::Vector3

Returns:



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

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

#zyCarbuncle::Point

Returns:



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

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

Instance Method Details

#inspectObject



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

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

#sizeObject



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

def size
  3
end

#to_aObject



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

def to_a
  [x, y, z]
end