|
Platformer
Platformer
|
A class representing a camera within our game. More...
#include <CameraComponent.hpp>


Public Member Functions | |
| CameraComponent () | |
| Constructs a new CameraComponent that renders the whole screen. More... | |
| CameraComponent (SDL_Rect renderView) | |
| Constructs a new CameraComponent that renders to the whole screen. More... | |
| CameraComponent (SDL_Rect renderView, SDL_Rect renderArea) | |
| Constructs a new CameraComponent. More... | |
| void | Update () override |
| Updates this component. | |
| void | Translate (SDL_Rect &dest) |
| Translates the given SDL_Rect based on this camera. | |
| void | SetActive () |
| Set this camera as the active camera. | |
| void | SetCaptureArea (SDL_Rect r) |
| Sets the area viewed by the camera to the given rect. | |
Public Member Functions inherited from Component | |
| void | SetParentGameObject (std::weak_ptr< GameObject > g) |
| Sets the given GameObject as this component's parent. More... | |
| virtual void | Init () |
| Initializes this component. | |
| std::shared_ptr< GameObject > | GetGameObject () |
| Gets a shared ptr reference to this component's GameObject. More... | |
Private Attributes | |
| SDL_Rect | renderView |
| The area of the game world to capture. | |
| SDL_Rect | renderArea |
| The render area for this camera. | |
Additional Inherited Members | |
Protected Attributes inherited from Component | |
| std::weak_ptr< GameObject > | gameObject |
| This component's parent GameObject. | |
A class representing a camera within our game.
| CameraComponent::CameraComponent | ( | ) |
Constructs a new CameraComponent that renders the whole screen.

| CameraComponent::CameraComponent | ( | SDL_Rect | renderView | ) |
Constructs a new CameraComponent that renders to the whole screen.
| renderView | The area of the game world to capture, defined by its center |

| CameraComponent::CameraComponent | ( | SDL_Rect | renderView, |
| SDL_Rect | renderArea | ||
| ) |
Constructs a new CameraComponent.
| renderView | The area of the game world to capture, defined by its center |
| renderArea | The render area on the screen for this camera |
1.8.14