PageRenderTime 17ms CodeModel.GetById 10ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

/src/renderer/camera.h

https://bitbucket.org/vivkin/gam3b00bs/
C++ Header | 31 lines | 26 code | 5 blank | 0 comment | 0 complexity | 71b8d797bb022dbba4f1ffad0384912e MD5 | raw file
 1#ifndef CAMERA_H
 2#define CAMERA_H
 3
 4#include "common.h"
 5#include "camera.h"
 6#include <d3d9.h>
 7#include <d3dx9.h>
 8
 9struct camera_t
10{
11	D3DXMATRIX view, projection;
12
13	D3DXVECTOR3	position;
14	D3DXVECTOR3	target;
15	float		angle;
16	float		radius;
17	float		phi;
18	float		fov;
19	float		aspect;
20	float		znear;
21	float		zfar;
22};
23
24void camera_look_at(camera_t &camera, const D3DXVECTOR3 &position, const D3DXVECTOR3 &center, const D3DXVECTOR3 &up);
25void camera_perspective(camera_t &camera, float fov, float aspect, float znear, float zfar);
26void camera_rotate(camera_t &camera, float delta);
27void camera_move(camera_t &camera, float dx, float dz);
28void camera_update(camera_t &camera);
29void camera_zoom(camera_t &camera, float delta);
30
31#endif /* CAMERA_H */