Sha256: 311c78f2daa9f4a2ece4183e6c758b9b0ddb9b8e9bb4c4b5e58fda6543f3bc45

Contents?: true

Size: 844 Bytes

Versions: 30

Compression:

Stored size: 844 Bytes

Contents

# Export for 2d3d boujou
class Tracksperanto::Export::Boujou < Tracksperanto::Export::Base
  
  def self.desc_and_extension
    "boujou_text.txt"
  end
  
  def self.human_name
    "boujou feature tracks"
  end
  
  DATETIME_FORMAT = '%a %b %d %H:%M:%S %Y'
  PREAMBLE = %[# boujou 2d tracks export: text
# boujou version: 4.1.0 28444 
# Creation date : %s
# 
# track_id      view      x      y]
  POINT_T = "%s  %d  %.3f  %.3f"
  
  def start_export( img_width, img_height)
    @height = img_height
    @io.puts(PREAMBLE % Time.now.strftime(DATETIME_FORMAT))
  end
  
  def start_tracker_segment(tracker_name)
    @tracker_name = tracker_name
  end
  
  def export_point(frame, abs_float_x, abs_float_y, float_residual)
    height_inv = @height - abs_float_y
    @io.puts(POINT_T % [@tracker_name, frame + 1, abs_float_x, height_inv])
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
tracksperanto-2.8.6 lib/export/boujou.rb
tracksperanto-2.8.5 lib/export/boujou.rb
tracksperanto-2.8.4 lib/export/boujou.rb
tracksperanto-2.8.2 lib/export/boujou.rb
tracksperanto-2.8.1 lib/export/boujou.rb
tracksperanto-2.8.0 lib/export/boujou.rb
tracksperanto-2.7.0 lib/export/boujou.rb
tracksperanto-2.6.3 lib/export/boujou.rb
tracksperanto-2.6.2 lib/export/boujou.rb
tracksperanto-2.6.1 lib/export/boujou.rb
tracksperanto-2.6.0 lib/export/boujou.rb
tracksperanto-2.5.0 lib/export/boujou.rb
tracksperanto-2.4.1 lib/export/boujou.rb
tracksperanto-2.3.3 lib/export/boujou.rb
tracksperanto-2.3.2 lib/export/boujou.rb
tracksperanto-2.3.1 lib/export/boujou.rb
tracksperanto-2.3.0 lib/export/boujou.rb
tracksperanto-2.2.4 lib/export/boujou.rb
tracksperanto-2.2.2 lib/export/boujou.rb
tracksperanto-2.2.0 lib/export/boujou.rb