Class: JennCad::Transformation

Inherits:
Object
  • Object
show all
Defined in:
lib/jenncad/transformation/transformation.rb

Direct Known Subclasses

Color, Mirror, Move, Multmatrix, Rotate, Scale

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Transformation

Returns a new instance of Transformation.



4
5
6
7
8
9
# File 'lib/jenncad/transformation/transformation.rb', line 4

def initialize(args)
  @pos = args[:pos]
  @x = args[:x]
  @y = args[:y]
  @z = args[:z]
end

Instance Attribute Details

#coordinatesObject

Returns the value of attribute coordinates.



3
4
5
# File 'lib/jenncad/transformation/transformation.rb', line 3

def coordinates
  @coordinates
end

#xObject

Returns the value of attribute x.



3
4
5
# File 'lib/jenncad/transformation/transformation.rb', line 3

def x
  @x
end

#yObject

Returns the value of attribute y.



3
4
5
# File 'lib/jenncad/transformation/transformation.rb', line 3

def y
  @y
end

#zObject

Returns the value of attribute z.



3
4
5
# File 'lib/jenncad/transformation/transformation.rb', line 3

def z
  @z
end