mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 10:48:34 +02:00
~ | Camera FOV and Bounce
This commit is contained in:
@ -100,19 +100,23 @@ glm::vec2 Camera::getDirection()
|
||||
return (glm::vec2(_pitch, _yaw));
|
||||
}
|
||||
|
||||
glm::vec2 Camera::getDOV()
|
||||
glm::vec3 Camera::getViewSetting()
|
||||
{
|
||||
return (glm::vec2(_aperture_size, _focus_distance));
|
||||
return (glm::vec3(_aperture_size, _focus_distance, _fov));
|
||||
}
|
||||
|
||||
GPUCamera Camera::getGPUData()
|
||||
{
|
||||
GPUCamera data;
|
||||
|
||||
data.view_matrix = getViewMatrix();
|
||||
data.camera_position = _position;
|
||||
|
||||
data.aperture_size = _aperture_size;
|
||||
data.focus_distance = _focus_distance;
|
||||
data.camera_position = _position;
|
||||
data.view_matrix = getViewMatrix();
|
||||
data.fov = _fov;
|
||||
|
||||
data.bounce = _bounce;
|
||||
|
||||
return (data);
|
||||
}
|
||||
@ -122,6 +126,11 @@ float Camera::getVelocity()
|
||||
return (glm::length(_velocity));
|
||||
}
|
||||
|
||||
int Camera::getBounce()
|
||||
{
|
||||
return (_bounce);
|
||||
}
|
||||
|
||||
void Camera::setPosition(glm::vec3 position)
|
||||
{
|
||||
_position = position;
|
||||
@ -137,4 +146,14 @@ void Camera::setDOV(float aperture, float focus)
|
||||
{
|
||||
_aperture_size = aperture;
|
||||
_focus_distance = focus;
|
||||
}
|
||||
|
||||
void Camera::setBounce(int bounce)
|
||||
{
|
||||
_bounce = bounce;
|
||||
}
|
||||
|
||||
void Camera::setFov(float fov)
|
||||
{
|
||||
_fov = fov;
|
||||
}
|
Reference in New Issue
Block a user