2014-02-16 14:32:28 +00:00
|
|
|
#ifndef __CAMERA_H_INCLUDED__
|
|
|
|
#define __CAMERA_H_INCLUDED__
|
|
|
|
|
2015-06-02 20:25:50 +00:00
|
|
|
#include "object.h"
|
|
|
|
|
2015-06-03 12:29:34 +00:00
|
|
|
class Camera {
|
2014-02-16 14:32:28 +00:00
|
|
|
private:
|
2015-06-03 12:29:34 +00:00
|
|
|
float position[3];
|
|
|
|
float target[3];
|
|
|
|
float matrix[9];
|
|
|
|
float *right, *up, *forward;
|
2014-02-16 14:32:28 +00:00
|
|
|
|
2015-06-02 20:25:50 +00:00
|
|
|
float positionang[3]; // position angulaire actuelle
|
|
|
|
float optimalposition[3]; // position angulaire que doit atteindre la caméra
|
|
|
|
// desc: {angh, dist, h}
|
|
|
|
|
|
|
|
bool end; // controle si c'est une caméra placée pour la mort
|
|
|
|
|
2015-06-03 12:29:34 +00:00
|
|
|
void calculateMatrix(void);
|
2014-02-16 14:32:28 +00:00
|
|
|
|
|
|
|
public:
|
2015-06-03 12:29:34 +00:00
|
|
|
Camera(void);
|
2014-02-16 14:32:28 +00:00
|
|
|
|
2015-06-02 20:25:50 +00:00
|
|
|
void setStart();
|
|
|
|
|
|
|
|
void setAutoNormal(Object *obj1, Object *obj2, bool finish);
|
|
|
|
void setAutoCastOut(Object *obj);
|
|
|
|
void setAutoBeheaded(Object *head, float angle);
|
|
|
|
void setAutoFallHead(Object *head, Object *torso);
|
2015-06-03 12:29:34 +00:00
|
|
|
void setPosition(float position[3]);
|
|
|
|
void setPosition(float x, float y, float z);
|
|
|
|
void getPosition(float *position);
|
|
|
|
void setTarget(float target[3]);
|
|
|
|
void getTarget(float *target);
|
|
|
|
void setUp(float up[3]);
|
|
|
|
void getMatrix(float *matrix);
|
2014-02-16 14:32:28 +00:00
|
|
|
|
2015-06-03 12:29:34 +00:00
|
|
|
void moveRight(float amount);
|
|
|
|
void moveUp(float amount);
|
|
|
|
void moveForward(float amount);
|
2014-02-16 14:32:28 +00:00
|
|
|
|
2015-06-03 12:29:34 +00:00
|
|
|
void glUpdate(void);
|
2014-02-16 14:32:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|