Class: Battle::Visual3D::CameraPositionner

Inherits:
Object
  • Object
show all
Defined in:
docs/5_Battle_02_Visual.rb

Overview

Class that handle the camera positionning in 3D battles

Instance Method Summary collapse

Constructor Details

#initialize(camera) ⇒ CameraPositionner

Create a new CameraPositionner use for the camera movement

Parameters:

  • camera (Camera) —

    camera to position



1720
1721
# File 'docs/5_Battle_02_Visual.rb', line 1720

def initialize(camera)
end

Instance Method Details

#rotate_x(roll)

Apply a rotation to the camera using roll

Parameters:

  • roll (Float) —

    angle around axis x (tilt)



1744
1745
# File 'docs/5_Battle_02_Visual.rb', line 1744

def rotate_x(roll)
end

#rotate_y(pitch)

Apply a rotation to the camera using pitch

Parameters:

  • pitch (Float) —

    angle around axis y (up-down)



1740
1741
# File 'docs/5_Battle_02_Visual.rb', line 1740

def rotate_y(pitch)
end

#rotate_z(yaw)

Apply a rotation to the camera using yaw

Parameters:

  • yaw (Float) —

    angle around axis z (left-right)



1736
1737
# File 'docs/5_Battle_02_Visual.rb', line 1736

def rotate_z(yaw)
end

#translation(t)

Parameters:

  • t (Float) —

    value of the translation, apply the same for x and y



1732
1733
# File 'docs/5_Battle_02_Visual.rb', line 1732

def translation(t)
end

#x(t)

Parameters:

  • t (Float) —

    value of x



1723
1724
# File 'docs/5_Battle_02_Visual.rb', line 1723

def x(t)
end

#y(t)

Parameters:

  • t (Float) —

    value of y



1726
1727
# File 'docs/5_Battle_02_Visual.rb', line 1726

def y(t)
end

#z(t)

Parameters:

  • t (Float) —

    value of z (0 is illegal)



1729
1730
# File 'docs/5_Battle_02_Visual.rb', line 1729

def z(t)
end