hx3d
1
2D/3D Simple Game Framework
Main Page
Namespaces
Classes
Files
File List
engine
include
hx3d
graphics
cameras
perspective_camera.hpp
1
/*
2
Perspective camera.
3
Inspired by LibGDX perspective camera.
4
5
Copyright (C) 2015 Denis BOURGE
6
7
This library is free software; you can redistribute it and/or
8
modify it under the terms of the GNU Lesser General Public
9
License as published by the Free Software Foundation; either
10
version 2.1 of the License, or (at your option) any later version.
11
12
This library is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
Lesser General Public License for more details.
16
17
You should have received a copy of the GNU Lesser General Public
18
License along with this library; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
20
USA
21
*/
22
23
#ifndef HX3D_GRAPHICS_CAMERAS_PERSPECTIVECAMERA
24
#define HX3D_GRAPHICS_CAMERAS_PERSPECTIVECAMERA
25
26
#include "hx3d/graphics/cameras/camera.hpp"
27
28
namespace
hx3d
{
29
namespace
graphics {
30
34
class
PerspectiveCamera
:
public
Camera
{
35
public
:
44
PerspectiveCamera
(
const
float
near
,
const
float
far
);
45
56
PerspectiveCamera
(
const
float
width,
const
float
height,
const
float
near,
const
float
far);
57
68
PerspectiveCamera
(
const
float
width,
const
float
height,
const
float
near,
const
float
far,
const
float
fov);
69
70
virtual
void
update
()
override
;
71
73
float
fieldOfView
;
74
};
75
76
}
/* graphics */
77
}
/* hx3d */
78
79
#endif
hx3d::graphics::Camera::near
float near
Near pane.
Definition:
camera.hpp:104
hx3d::graphics::Camera
2D/3D camera.
Definition:
camera.hpp:41
hx3d::graphics::PerspectiveCamera
3D perspective camera.
Definition:
perspective_camera.hpp:34
hx3d
hx3d framework namespace
Definition:
audio.hpp:26
hx3d::graphics::Camera::far
float far
Far pane.
Definition:
camera.hpp:106
hx3d::graphics::PerspectiveCamera::PerspectiveCamera
PerspectiveCamera(const float near, const float far)
Create a perspective camera with the screen size and the near and far.
Definition:
perspective_camera.cpp:33
hx3d::graphics::PerspectiveCamera::update
virtual void update() override
Update the camera.
Definition:
perspective_camera.cpp:47
hx3d::graphics::PerspectiveCamera::fieldOfView
float fieldOfView
Field of view (FOV)
Definition:
perspective_camera.hpp:73
Generated by
1.8.11