Class: Raylib::Camera3D
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Camera3D
- Defined in:
- lib/raylib/core/structs/camera3_d.rb
Overview
Camera, defines position/orientation in 3d space
Class Method Summary collapse
Instance Method Summary collapse
-
#fovy ⇒ Float
Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic.
-
#fovy=(new_fovy) ⇒ Object
Sets Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic.
-
#position ⇒ Vector3
Camera position.
-
#position=(new_position) ⇒ Object
Sets Camera position.
-
#projection ⇒ Integer
Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC.
-
#projection=(new_projection) ⇒ Object
Sets Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC.
-
#target ⇒ Vector3
Camera target it looks-at.
-
#target=(new_target) ⇒ Object
Sets Camera target it looks-at.
- #to_s ⇒ Object
-
#up ⇒ Vector3
Camera up vector (rotation over its axis).
-
#up=(new_up) ⇒ Object
Sets Camera up vector (rotation over its axis).
Class Method Details
.create(position, target, up, fovy, projection) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/raylib/core/structs/camera3_d.rb', line 12 def self.create(position, target, up, fovy, projection) new.tap do |instance| instance[:position] = position instance[:target] = target instance[:up] = up instance[:fovy] = fovy instance[:projection] = projection end end |
Instance Method Details
#fovy ⇒ Float
Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
55 |
# File 'lib/raylib/core/structs/camera3_d.rb', line 55 def fovy = self[:fovy] |
#fovy=(new_fovy) ⇒ Object
Sets Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
58 59 60 |
# File 'lib/raylib/core/structs/camera3_d.rb', line 58 def fovy=(new_fovy) self[:fovy] = new_fovy end |
#position ⇒ Vector3
Camera position
28 |
# File 'lib/raylib/core/structs/camera3_d.rb', line 28 def position = self[:position] |
#position=(new_position) ⇒ Object
Sets Camera position
31 32 33 |
# File 'lib/raylib/core/structs/camera3_d.rb', line 31 def position=(new_position) self[:position] = new_position end |
#projection ⇒ Integer
Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
64 |
# File 'lib/raylib/core/structs/camera3_d.rb', line 64 def projection = self[:projection] |
#projection=(new_projection) ⇒ Object
Sets Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
67 68 69 |
# File 'lib/raylib/core/structs/camera3_d.rb', line 67 def projection=(new_projection) self[:projection] = new_projection end |
#target ⇒ Vector3
Camera target it looks-at
37 |
# File 'lib/raylib/core/structs/camera3_d.rb', line 37 def target = self[:target] |
#target=(new_target) ⇒ Object
Sets Camera target it looks-at
40 41 42 |
# File 'lib/raylib/core/structs/camera3_d.rb', line 40 def target=(new_target) self[:target] = new_target end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/raylib/core/structs/camera3_d.rb', line 22 def to_s "Raylib::Camera3D##{object_id} position=#{position} target=#{target} up=#{up} fovy=#{fovy} projection=#{projection}" end |
#up ⇒ Vector3
Camera up vector (rotation over its axis)
46 |
# File 'lib/raylib/core/structs/camera3_d.rb', line 46 def up = self[:up] |
#up=(new_up) ⇒ Object
Sets Camera up vector (rotation over its axis)
49 50 51 |
# File 'lib/raylib/core/structs/camera3_d.rb', line 49 def up=(new_up) self[:up] = new_up end |