Sha256: 9147c268c7a053a268f04cb9ed5faa6a6d81f6a6fa9f917b6d4de15005550f44

Contents?: true

Size: 800 Bytes

Versions: 2

Compression:

Stored size: 800 Bytes

Contents

Joybox::Physics::RayCastInput = B2DRayCastInput

class B2DRayCastInput

  alias_method :metric_first_point, :point1
  alias_method :metric_first_point=, :setPoint1
  alias_method :metric_second_point, :point2
  alias_method :metric_second_point=, :setPoint2
  alias_method :maximum_fraction, :maxFraction
  alias_method :maximum_fraction=, :setMaxFraction

  def first_point
    metric_first_point.to_pixel_coordinates
  end

  def first_point=(point)
    point = point.to_point unless point.is_a? (CGPoint)
    self.metric_first_point = point.from_pixel_coordinates
  end

  def second_point
    metric_second_point.to_pixel_coordinates
  end

  def second_point=(point)
    point = point.to_point unless point.is_a? (CGPoint)
    self.metric_second_point = point.from_pixel_coordinates
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
joybox-1.1.1 motion/joybox/physics/ray_cast_input.rb
joybox-1.1.0 motion/joybox/physics/ray_cast_input.rb