Class: Raylib::Ray
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Ray
- Defined in:
- lib/raylib/core/structs/ray.rb
Overview
Ray, ray for raycasting
Class Method Summary collapse
Instance Method Summary collapse
-
#direction ⇒ Vector3
Ray direction.
-
#direction=(new_direction) ⇒ Object
Sets Ray direction.
-
#position ⇒ Vector3
Ray position (origin).
-
#position=(new_position) ⇒ Object
Sets Ray position (origin).
- #to_s ⇒ Object
Class Method Details
.create(position, direction) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/raylib/core/structs/ray.rb', line 9 def self.create(position, direction) new.tap do |instance| instance[:position] = position instance[:direction] = direction end end |
Instance Method Details
#direction ⇒ Vector3
Ray direction
31 |
# File 'lib/raylib/core/structs/ray.rb', line 31 def direction = self[:direction] |
#direction=(new_direction) ⇒ Object
Sets Ray direction
34 35 36 |
# File 'lib/raylib/core/structs/ray.rb', line 34 def direction=(new_direction) self[:direction] = new_direction end |
#position ⇒ Vector3
Ray position (origin)
22 |
# File 'lib/raylib/core/structs/ray.rb', line 22 def position = self[:position] |
#position=(new_position) ⇒ Object
Sets Ray position (origin)
25 26 27 |
# File 'lib/raylib/core/structs/ray.rb', line 25 def position=(new_position) self[:position] = new_position end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/raylib/core/structs/ray.rb', line 16 def to_s "Raylib::Ray##{object_id} position=#{position} direction=#{direction}" end |