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
1053 1054 |
# File 'docs/00000_Dependencies.rb', line 1053 def initialize() end |
Instance Attribute Details
#pitch ⇒ Numeric (readonly)
Get the camera pitch
1038 1039 1040 |
# File 'docs/00000_Dependencies.rb', line 1038 def pitch @pitch end |
#roll ⇒ Numeric (readonly)
Get the camera roll
1044 1045 1046 |
# File 'docs/00000_Dependencies.rb', line 1044 def roll @roll end |
#was_updated ⇒ Boolean (readonly)
Check if the camera was updated
1047 1048 1049 |
# File 'docs/00000_Dependencies.rb', line 1047 def was_updated @was_updated end |
#yaw ⇒ Numeric (readonly)
Get the camera yaw
1041 1042 1043 |
# File 'docs/00000_Dependencies.rb', line 1041 def yaw @yaw end |
#z ⇒ Numeric (readonly)
Get the z coordinate of the camera
1050 1051 1052 |
# File 'docs/00000_Dependencies.rb', line 1050 def z @z end |
Instance Method Details
#apply_to(sprite)
Apply the camera to a sprite
1077 1078 |
# File 'docs/00000_Dependencies.rb', line 1077 def apply_to(sprite) end |
#set_position(x, y, z)
Set the camera position
1065 1066 |
# File 'docs/00000_Dependencies.rb', line 1065 def set_position(x, y, z) end |
#set_rotation(yaw, pitch, roll)
Set the camera rotation
1059 1060 |
# File 'docs/00000_Dependencies.rb', line 1059 def set_rotation(yaw, pitch, roll) end |
#x ⇒ Numeric
Get the x coordinate of the camera
1069 1070 |
# File 'docs/00000_Dependencies.rb', line 1069 def x end |
#y ⇒ Numeric
Get the y coordinate of the camera
1073 1074 |
# File 'docs/00000_Dependencies.rb', line 1073 def y end |