Class: Tracksperanto::Middleware::Golden

Inherits:
Base
  • Object
show all
Defined in:
lib/middleware/golden.rb

Overview

This middleware marks all trackers as being 100% accurate

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#end_export, #end_tracker_segment, #initialize, #start_export, #start_tracker_segment

Methods included from BlockInit

#initialize

Methods included from Casts

#cast_to_float, #cast_to_int, #cast_to_string, included

Constructor Details

This class inherits a constructor from Tracksperanto::Middleware::Base

Instance Attribute Details

#enabledObject

Returns the value of attribute enabled.



3
4
5
# File 'lib/middleware/golden.rb', line 3

def enabled
  @enabled
end

Instance Method Details

#export_point(frame, float_x, float_y, float_residual) ⇒ Object



9
10
11
# File 'lib/middleware/golden.rb', line 9

def export_point(frame, float_x, float_y, float_residual)
  super(frame, float_x, float_y, (enabled ? 0.0 : float_residual))
end