MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
camera_2d.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015, Simon Fuhrmann
3 * TU Darmstadt - Graphics, Capture and Massively Parallel Computing
4 * All rights reserved.
5 *
6 * This software may be modified and distributed under the terms
7 * of the BSD 3-Clause license. See the LICENSE.txt file for details.
8 */
9
10#ifndef OPENGL_CAMERA_2D_HEADER
11#define OPENGL_CAMERA_2D_HEADER
12
13#include "math/vector.h"
14#include "ogl/defines.h"
15#include "ogl/events.h"
16#include "ogl/camera.h"
17
19
20class Cam2D
21{
22public:
23 Cam2D(void);
24
25 void set_camera (Camera* camera);
26 void consume_event (MouseEvent const& event);
27 void consume_event(KeyboardEvent const& event);
28 math::Vec3f get_campos(void);
29 math::Vec3f get_viewdir(void);
30 math::Vec3f get_upvec(void);
31
32private:
33 /* Camera information. */
34 Camera* cam;
35
36 float radius;
37 math::Vec3f center;
38 math::Vec2f mousePos;
39 math::Vec3f tocam;
40 math::Vec3f upvec;
41};
42
44
45#endif /* OPENGL_CAMERA_2D_HEADER */
Vector class for arbitrary dimensions and types.
Definition vector.h:87
A camera class that manages viewing and projection matrices.
Definition camera.h:33
#define OGL_NAMESPACE_END
Definition defines.h:14
#define OGL_NAMESPACE_BEGIN
Definition defines.h:13
Keyboard event.
Definition events.h:57
Mouse event.
Definition events.h:40