Sha256: c5597497661f1a7366f21b3353d0df236cb3a483bbeb1cc2cb9af58cc0e29062

Contents?: true

Size: 774 Bytes

Versions: 7

Compression:

Stored size: 774 Bytes

Contents

require File.dirname(__FILE__) + '/helper'

class SyntheyesImportTest < Test::Unit::TestCase
  DELTA = 0.9 # our SynthEyes sample is smoewhat inaccurate :-P
  
  def test_parsing_from_importable
    fixture = File.read(File.dirname(__FILE__) + '/samples/shake_tracker_nodes_to_syntheyes.txt')
    
    parser = Tracksperanto::Import::Syntheyes.new
    parser.width = 2560
    parser.height = 1080
    
    trackers = parser.parse(fixture)
    assert_equal 50, trackers.length
    
    first_kf = trackers[0].keyframes[0]
    
    assert_equal "Tracker1", trackers[0].name
    
    assert_equal 0, first_kf.frame
    assert_in_delta 715.839, first_kf.abs_x, DELTA
    assert_in_delta 886.212, first_kf.abs_y, DELTA
    assert_in_delta 30.0, first_kf.residual, DELTA
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tracksperanto-1.1.1 test/test_syntheyes_import.rb
tracksperanto-1.1.0 test/test_syntheyes_import.rb
tracksperanto-1.0.6 test/test_syntheyes_import.rb
tracksperanto-1.0.4 test/test_syntheyes_import.rb
tracksperanto-1.0.2 test/test_syntheyes_import.rb
tracksperanto-1.0.1 test/test_syntheyes_import.rb
tracksperanto-1.0.0 test/test_syntheyes_import.rb