Class: MSPhysics::Hit

Inherits:
Entity
  • Object
show all
Defined in:
RubyExtension/MSPhysics/hit.rb

Overview

Since:

  • 1.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#inspect, #to_s

Constructor Details

#initialize(body, point, normal) ⇒ Hit

Returns a new instance of Hit.

Parameters:

  • body (Body)
  • point (Geom::Point3d, Array<Numeric>)
  • normal (Geom::Vector3d, Array<Numeric>)

Since:

  • 1.0.0



9
10
11
12
13
# File 'RubyExtension/MSPhysics/hit.rb', line 9

def initialize(body, point, normal)
  @body = body
  @point = Geom::Point3d.new(point)
  @normal = Geom::Vector3d.new(normal)
end

Instance Attribute Details

#bodyBody (readonly)

Returns:

Since:

  • 1.0.0



# File 'RubyExtension/MSPhysics/hit.rb', line 15

#normalGeom::Vector3d (readonly)

Returns:

  • (Geom::Vector3d)

Since:

  • 1.0.0



# File 'RubyExtension/MSPhysics/hit.rb', line 21

#pointGeom::Point3d (readonly)

Returns:

  • (Geom::Point3d)

Since:

  • 1.0.0



# File 'RubyExtension/MSPhysics/hit.rb', line 18