Class: Fake3D::Camera
Overview
Camera of a Fake3D scene
This class is used to help Sprite3D to render at the right position by applying a camera matrix
Constant Summary collapse
- MIN_Z =
Minimum Z the camera can go
0.1
Instance Attribute Summary collapse
-
#pitch ⇒ Numeric
readonly
Get the camera pitch.
-
#roll ⇒ Numeric
readonly
Get the camera roll.
-
#was_updated ⇒ Boolean
readonly
Check if the camera was updated.
-
#yaw ⇒ Numeric
readonly
Get the camera yaw.
-
#z ⇒ Numeric
readonly
Get the z coordinate of the camera.
Instance Method Summary collapse
-
#apply_to(sprite)
Apply the camera to a sprite.
-
#initialize(viewport) ⇒ Camera
constructor
Create a new Camera.
-
#set_position(x, y, z)
Set the camera position.
-
#set_rotation(yaw, pitch, roll)
Set the camera rotation.
-
#x ⇒ Numeric
Get the x coordinate of the camera.
-
#y ⇒ Numeric
Get the y coordinate of the camera.
Constructor Details
#initialize(viewport) ⇒ Camera
Create a new Camera
1600 1601 |
# File 'docs/0_Dependencies.rb', line 1600 def initialize() end |
Instance Attribute Details
#pitch ⇒ Numeric (readonly)
Get the camera pitch
1585 1586 1587 |
# File 'docs/0_Dependencies.rb', line 1585 def pitch @pitch end |
#roll ⇒ Numeric (readonly)
Get the camera roll
1591 1592 1593 |
# File 'docs/0_Dependencies.rb', line 1591 def roll @roll end |
#was_updated ⇒ Boolean (readonly)
Check if the camera was updated
1594 1595 1596 |
# File 'docs/0_Dependencies.rb', line 1594 def was_updated @was_updated end |
#yaw ⇒ Numeric (readonly)
Get the camera yaw
1588 1589 1590 |
# File 'docs/0_Dependencies.rb', line 1588 def yaw @yaw end |
#z ⇒ Numeric (readonly)
Get the z coordinate of the camera
1597 1598 1599 |
# File 'docs/0_Dependencies.rb', line 1597 def z @z end |
Instance Method Details
#apply_to(sprite)
Apply the camera to a sprite
1624 1625 |
# File 'docs/0_Dependencies.rb', line 1624 def apply_to(sprite) end |
#set_position(x, y, z)
Set the camera position
1612 1613 |
# File 'docs/0_Dependencies.rb', line 1612 def set_position(x, y, z) end |
#set_rotation(yaw, pitch, roll)
Set the camera rotation
1606 1607 |
# File 'docs/0_Dependencies.rb', line 1606 def set_rotation(yaw, pitch, roll) end |
#x ⇒ Numeric
Get the x coordinate of the camera
1616 1617 |
# File 'docs/0_Dependencies.rb', line 1616 def x end |
#y ⇒ Numeric
Get the y coordinate of the camera
1620 1621 |
# File 'docs/0_Dependencies.rb', line 1620 def y end |