lib/export/base.rb in tracksperanto-2.1.0 vs lib/export/base.rb in tracksperanto-2.1.1
- old
+ new
@@ -1,17 +1,25 @@
# Base exporter. Inherit from this class to automatically register another export format.
# The exporters in Tracksperanto are event-driven and follow the same conventions - your
# exporter will be notified when a tracker will be exported and when a tracker has been passed
# (the last keyframe has been sent). Here's how you can operate any exporter module
-# separately:
+# separately (this also demonstrates the calling convention and sequence):
#
# File.open("destination.txt", "wb") do | f |
# exporter = SomeExporter.new(f)
# exporter.start_export(720, 576)
+#
+# # Export the first tracker
# exporter.start_tracker_segment("FirstPoint")
# exporter.export_point(2, 123.43, 456.2, 0.2)
+# exporter.export_point(3, 23423.43, 768.1, 0.1)
# exporter.end_tracker_segment
+#
+# # Export the second tracker
+# exporter.start_tracker_segment("AnotherPoint")
+# ....
+# exported.end_tracker_segment
# exporter.end_export
# end
#
class Tracksperanto::Export::Base
include Tracksperanto::ConstName
@@ -62,6 +70,6 @@
# Called for each tracker keyframe, with the Tracksperanto internal coordinates and frame numbers.
# The calls come after start_tracker_segment and before end_tracker_segment
def export_point(at_frame_i, abs_float_x, abs_float_y, float_residual)
end
-end
\ No newline at end of file
+end