2012-01-23 23:45:33 +00:00
|
|
|
#ifndef _PAYSAGES_CAMERA_H_
|
|
|
|
#define _PAYSAGES_CAMERA_H_
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2012-01-29 21:45:58 +00:00
|
|
|
#include "shared/types.h"
|
|
|
|
#include "renderer.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-01-23 23:45:33 +00:00
|
|
|
void cameraSave(FILE* f, CameraDefinition* camera);
|
|
|
|
void cameraLoad(FILE* f, CameraDefinition* camera);
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
void cameraSetLocation(CameraDefinition* camera, double x, double y, double z);
|
|
|
|
void cameraSetTarget(CameraDefinition* camera, double x, double y, double z);
|
2012-01-29 11:34:49 +00:00
|
|
|
void cameraSetRoll(CameraDefinition* camera, double angle);
|
2012-01-27 16:01:34 +00:00
|
|
|
|
|
|
|
void cameraStrafeForward(CameraDefinition* camera, double value);
|
|
|
|
void cameraStrafeRight(CameraDefinition* camera, double value);
|
|
|
|
void cameraStrafeUp(CameraDefinition* camera, double value);
|
2012-01-27 17:21:57 +00:00
|
|
|
void cameraRotateYaw(CameraDefinition* camera, double value);
|
2012-01-29 11:34:49 +00:00
|
|
|
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 cameraProjectToFragment(CameraDefinition* camera, Renderer* renderer, double x, double y, double z, RenderFragment* result);
|
|
|
|
/*void cameraPushOverlay(CameraDefinition* camera, Color col, f_RenderFragmentCallback callback);*/
|
2012-01-23 23:45:33 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|