Class: VORuby::STC::V1_10::Coords::Vector2Coordinate

Inherits:
CoordinateType show all
Defined in:
lib/voruby/stc/1.10/coords.rb

Overview

Generic 2-D coordinate type. Single CError2, CResolution2, CSize2, CPixSize2 elements indicate definite values; pairs indicate ranges.

Direct Known Subclasses

Position2D, Velocity2D

Instance Attribute Summary collapse

Attributes inherited from CoordinateType

#name

Instance Method Summary collapse

Methods included from SerializableToXml

#element

Constructor Details

#initialize(options = {}) ⇒ Vector2Coordinate

Returns a new instance of Vector2Coordinate.



993
994
995
# File 'lib/voruby/stc/1.10/coords.rb', line 993

def initialize(options={})
  options.each { |key, value| send("#{key}=", value) }
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



991
992
993
# File 'lib/voruby/stc/1.10/coords.rb', line 991

def error
  @error
end

#pix_sizeObject

Returns the value of attribute pix_size.



991
992
993
# File 'lib/voruby/stc/1.10/coords.rb', line 991

def pix_size
  @pix_size
end

#resolutionObject

Returns the value of attribute resolution.



991
992
993
# File 'lib/voruby/stc/1.10/coords.rb', line 991

def resolution
  @resolution
end

#sizeObject

Returns the value of attribute size.



991
992
993
# File 'lib/voruby/stc/1.10/coords.rb', line 991

def size
  @size
end

#valueObject

Returns the value of attribute value.



991
992
993
# File 'lib/voruby/stc/1.10/coords.rb', line 991

def value
  @value
end

Instance Method Details

#==(sc) ⇒ Object



1050
1051
1052
1053
1054
1055
1056
1057
# File 'lib/voruby/stc/1.10/coords.rb', line 1050

def ==(sc)
  super(sc) and
  self.value == sc.value and
  self.error == sc.error and
  self.resolution == sc.resolution and
  self.size == sc.size and
  self.pix_size == sc.pix_size
end