Class: Handle
Instance Attribute Summary collapse
-
#parameterized_location ⇒ Object
readonly
Returns the value of attribute parameterized_location.
-
#pixel_location ⇒ Object
readonly
Returns the value of attribute pixel_location.
-
#transformation_matrix ⇒ Object
readonly
Returns the value of attribute transformation_matrix.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data) ⇒ Handle
constructor
A new instance of Handle.
Constructor Details
#initialize(data) ⇒ Handle
Returns a new instance of Handle.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/handle.rb', line 10 def initialize(data) @transformation_matrix = Matrix.build(3,3) do DoubleLe.read(data) end LOGGER.debug "matrix is #{@transformation_matrix.inspect}" @parameterized_location = ParameterizedLocation.new( BinData::Uint32le.read(data), DoubleLe.read(data) ) LOGGER.debug "parameterized location is #{@parameterized_location.inspect}" # pixel location @pixel_location = Point.new( DoubleLe.read(data), DoubleLe.read(data) ) LOGGER.debug "pixel_location is #{@pixel_location.inspect}" @type = BinData::Int16le.read(data) LOGGER.debug "handle type is #{@type}" end |
Instance Attribute Details
#parameterized_location ⇒ Object (readonly)
Returns the value of attribute parameterized_location.
4 5 6 |
# File 'lib/handle.rb', line 4 def parameterized_location @parameterized_location end |
#pixel_location ⇒ Object (readonly)
Returns the value of attribute pixel_location.
4 5 6 |
# File 'lib/handle.rb', line 4 def pixel_location @pixel_location end |
#transformation_matrix ⇒ Object (readonly)
Returns the value of attribute transformation_matrix.
4 5 6 |
# File 'lib/handle.rb', line 4 def transformation_matrix @transformation_matrix end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/handle.rb', line 4 def type @type end |