Sha256: 49bc3767b21914d09cfbddd773781438faf180eac754fd7c6799c05629731e49

Contents?: true

Size: 872 Bytes

Versions: 4

Compression:

Stored size: 872 Bytes

Contents

# Base exporter
class Tracksperanto::Export::Base
  attr_reader :io
  
  def self.inherited(by)
    Tracksperanto.exporters << by
    super
  end
  
  # Should return the suffix and extension of this export file (like "_flame.stabilizer"). It's a class
  # method because it gets requested before the exporter is instantiated
  def self.desc_and_extension
    "data.txt"
  end
  
  def initialize(write_to_io)
    @io = write_to_io
  end
  
  # Called on export start
  def start_export( img_width, img_height)
  end
  
  # Called on export end
  def 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)
  end
  
  # Called for each tracker keyframe
  def export_point(at_frame_i, abs_float_x, abs_float_y, float_residual)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tracksperanto-1.0.6 lib/export/base.rb
tracksperanto-1.0.4 lib/export/base.rb
tracksperanto-1.0.2 lib/export/base.rb
tracksperanto-1.0.1 lib/export/base.rb