2012-01-23 23:45:33 +00:00
|
|
|
#ifndef _PAYSAGES_CAMERA_H_
|
|
|
|
#define _PAYSAGES_CAMERA_H_
|
|
|
|
|
2012-01-29 21:45:58 +00:00
|
|
|
#include "shared/types.h"
|
|
|
|
#include "renderer.h"
|
2012-04-22 17:12:39 +00:00
|
|
|
#include "pack.h"
|
2012-01-23 23:45:33 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void cameraInit();
|
2012-02-12 16:57:29 +00:00
|
|
|
void cameraQuit();
|
2012-04-22 17:12:39 +00:00
|
|
|
void cameraSave(PackStream* stream, CameraDefinition* camera);
|
|
|
|
void cameraLoad(PackStream* stream, CameraDefinition* camera);
|
2012-01-23 23:45:33 +00:00
|
|
|
|
|
|
|
CameraDefinition cameraCreateDefinition();
|
|
|
|
void cameraDeleteDefinition(CameraDefinition* definition);
|
|
|
|
void cameraCopyDefinition(CameraDefinition* source, CameraDefinition* destination);
|
2012-01-29 11:34:49 +00:00
|
|
|
void cameraValidateDefinition(CameraDefinition* definition, int check_above);
|
2012-01-23 23:45:33 +00:00
|
|
|
|
2012-06-17 09:40:40 +00:00
|
|
|
void cameraSetLocation(CameraDefinition* camera, double x, double y, double z);
|
|
|
|
void cameraSetTarget(CameraDefinition* camera, double x, double y, double z);
|
|
|
|
void cameraSetRoll(CameraDefinition* camera, double angle);
|
2012-01-27 16:01:34 +00:00
|
|
|
|
2012-06-17 09:40:40 +00:00
|
|
|
void cameraStrafeForward(CameraDefinition* camera, double value);
|
|
|
|
void cameraStrafeRight(CameraDefinition* camera, double value);
|
|
|
|
void cameraStrafeUp(CameraDefinition* camera, double value);
|
|
|
|
void cameraRotateYaw(CameraDefinition* camera, double value);
|
|
|
|
void cameraRotatePitch(CameraDefinition* camera, double value);
|
|
|
|
void cameraRotateRoll(CameraDefinition* camera, double value);
|
2012-01-27 16:01:34 +00:00
|
|
|
|
2012-01-31 11:20:52 +00:00
|
|
|
void cameraSetRenderSize(CameraDefinition* camera, int width, int height);
|
|
|
|
|
2012-01-29 21:45:58 +00:00
|
|
|
Vector3 cameraProject(CameraDefinition* camera, Renderer* renderer, Vector3 point);
|
|
|
|
Vector3 cameraUnproject(CameraDefinition* camera, Renderer* renderer, Vector3 point);
|
|
|
|
/*void cameraPushOverlay(CameraDefinition* camera, Color col, f_RenderFragmentCallback callback);*/
|
2012-06-17 09:40:40 +00:00
|
|
|
int cameraIsBoxInView(CameraDefinition* camera, Vector3 center, double xsize, double ysize, double zsize);
|
2012-05-09 16:26:07 +00:00
|
|
|
|
2012-01-23 23:45:33 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|