Class: Tracksperanto::Import::SyntheyesAllTrackerPaths

Inherits:
Base
  • Object
show all
Defined in:
lib/import/syntheyes_all_tracker_paths.rb

Constant Summary collapse

CHARACTERS_OR_QUOTES =
/[AZaz"]/
TRACKER_KEYFRAME =
/^(\d+) ((\d+)\.(\d+)) ((\d+)\.(\d+))/

Instance Attribute Summary

Attributes inherited from Base

#height, #io, #progress_block, #width

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

autodetects_size?, distinct_file_ext, inherited, known_snags, #report_progress

Methods included from BlockInit

#initialize

Methods included from ZipTuples

#zip_curve_tuples

Methods included from ConstName

#const_name, included

Methods included from Safety

included, #safe_reader

Methods included from Casts

#cast_to_bool, #cast_to_float, #cast_to_int, #cast_to_string, included

Class Method Details

.human_nameObject



3
4
5
# File 'lib/import/syntheyes_all_tracker_paths.rb', line 3

def self.human_name
  "Syntheyes \"All Tracker Paths\" export .txt file"
end

Instance Method Details

#eachObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/import/syntheyes_all_tracker_paths.rb', line 10

def each
  t = Tracksperanto::Tracker.new
  while line = @io.gets do
    if line =~ CHARACTERS_OR_QUOTES
      t = Tracksperanto::Tracker.new(:name => line)
      fill_tracker(t, @io)
      yield(t)
    end
  end
end