Meteor2D  dev internal
Meteor is a lightweight 2D game engine.
Loading...
Searching...
No Matches
camera.h
1#pragma once
2#include <meteorutils/rect.h>
3#include <entities/spatial.h>
4
5namespace meteor {
10 class MCamera : public MSpatialEntity {
11 public:
12
13 ~MCamera();
17 MCamera() : MCamera(SVector2::make(0, 0), 0) {};
23 MCamera(SVector2 position, uint8_t sortingOrder);
27 inline void setActive(bool active) { active = active; }
32 bool isInsideBounds(SVector2 position);
36 inline bool isActive() { return active; }
40 inline uint8_t getSortingOrder() { return sortingOrder; }
41 private:
42 SVector2 boundsCentre;
43 uint8_t sortingOrder;
44 bool active;
45 };
46}
Camera entity uses provides camera like functionlity to manage world view.
Definition camera.h:10
bool isActive()
Definition camera.h:36
void setActive(bool active)
Sets the Camera active status.
Definition camera.h:27
MCamera(SVector2 position, uint8_t sortingOrder)
Constructor.
MCamera()
default Constructor
Definition camera.h:17
uint8_t getSortingOrder()
Definition camera.h:40
bool isInsideBounds(SVector2 position)
Checks if a provided position within camera bounds.
Spatial Entity is the base entity for all types present in scene. This entity keeps track of spatial ...
Definition spatial.h:15
A structure representing a 2D Vector.
Definition vector2d.h:11