1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
matabstrix/src/camera.hpp
Meoweg cef70d5c0f Define classes as structs
for default public access and inheritance
2015-11-13 10:49:04 +00:00

26 lines
400 B
C++

#ifndef _CAMERA_HPP_
#define _CAMERA_HPP_
#include "transformation.hpp"
#include "scene.hpp"
struct Camera :
Transformation
{
inline Camera(const Scene &scene) : _scene(scene) {}
inline void draw() const;
glm::mat4 transformation() const;
glm::mat4 projection;
private:
const Scene &_scene;
};
void Camera::draw() const
{
_scene.draw(transformation());
};
#endif // _CAMERA_HPP_