Sha256: 837b66faf0c1baf880c6da039d2fec536b59f1565828cc24c20b90f007d7951d

Contents?: true

Size: 865 Bytes

Versions: 2

Compression:

Stored size: 865 Bytes

Contents

class Tracksperanto::Middleware::Base
  include Tracksperanto::Casts
  
  def initialize(exporter)
    @exporter = exporter
  end
  
  # Called on export start
  def start_export( img_width, img_height)
    @exporter.start_export(img_width, img_height)
  end
  
  # Called on export end
  def end_export
    @exporter.end_export
  end
  
  # Called on tracker start, one for each tracker. Start of the next tracker
  # signifies that the previous tracker has passed by
  def start_tracker_segment(tracker_name)
    @exporter.start_tracker_segment(tracker_name)
  end
  
  # Called on tracker end
  def end_tracker_segment
    @exporter.end_tracker_segment
  end
  
  # Called for each tracker keyframe
  def export_point(at_frame_i, abs_float_x, abs_float_y, float_residual)
    @exporter.export_point(at_frame_i, abs_float_x, abs_float_y, float_residual)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tracksperanto-1.1.1 lib/middleware/base.rb
tracksperanto-1.1.0 lib/middleware/base.rb