Camera2D component.
More...
#include <camera.h>
Camera2D component.
- Projection type
orthographic
- Parameters
-
view_width | Viewport width |
view_height | Viewport height |
zoom | Camera zoom between (0.0f - 10.0f) |
- Version
- 0.0.5
◆ Camera2D()
Camera2D::Camera2D |
( |
int |
view_width, |
|
|
int |
view_height, |
|
|
float |
zoom = 1.0f |
|
) |
| |
|
inline |
◆ GetHeight()
int Camera2D::GetHeight |
( |
| ) |
const |
|
inline |
◆ GetProjectionMatrix()
glm::mat4 Camera2D::GetProjectionMatrix |
( |
| ) |
const |
Get the projection matrix (orthographic)
- Version
- 0.0.4
- Returns
- glm::mat4 Matrix
◆ GetViewMatrix()
glm::mat4 Camera2D::GetViewMatrix |
( |
| ) |
const |
◆ GetViewport()
glm::vec4 Camera2D::GetViewport |
( |
| ) |
const |
Get the viewport.
- Version
- 0.0.4
- Returns
- glm::vec4 Viewport
◆ GetWidth()
int Camera2D::GetWidth |
( |
| ) |
const |
|
inline |
◆ GetZoom()
float Camera2D::GetZoom |
( |
| ) |
const |
|
inline |
◆ IsVisible()
bool Camera2D::IsVisible |
( |
const glm::vec3 & |
position | ) |
|
Check if the position is visible by the camera.
- Parameters
-
- Version
- 0.0.4
- Returns
- bool
◆ Resize()
void Camera2D::Resize |
( |
int |
view_width, |
|
|
int |
view_height |
|
) |
| |
Resize the camera view.
- Parameters
-
view_width | Viewport width |
view_height | Viewport height |
- Version
- 0.0.4
- Returns
- void
◆ SetZoom()
void Camera2D::SetZoom |
( |
float |
zoom | ) |
|
|
inline |
◆ transform
◆ zoom
float Camera2D::zoom = 1.0f |
The documentation for this struct was generated from the following files: