2015-04-16 16:55:32 +00:00
|
|
|
#ifndef SIMPLE_CAMERA_H
|
|
|
|
#define SIMPLE_CAMERA_H
|
|
|
|
|
2015-04-16 22:16:13 +00:00
|
|
|
#include "../CommonInterfaces/CommonCameraInterface.h"
|
2015-04-16 16:55:32 +00:00
|
|
|
|
|
|
|
struct SimpleCamera : public CommonCameraInterface
|
|
|
|
{
|
|
|
|
struct SimpleCameraInternalData* m_data;
|
|
|
|
|
|
|
|
SimpleCamera();
|
|
|
|
virtual ~SimpleCamera();
|
|
|
|
|
|
|
|
void update();
|
|
|
|
virtual void getCameraProjectionMatrix(float m[16]) const;
|
|
|
|
virtual void getCameraViewMatrix(float m[16]) const;
|
|
|
|
|
2016-05-19 16:19:36 +00:00
|
|
|
virtual void setVRCamera(const float viewMat[16], const float projectionMatrix[16]);
|
2017-01-06 01:41:58 +00:00
|
|
|
virtual bool getVRCamera(float viewMat[16], float projectionMatrix[16]);
|
|
|
|
|
2016-09-08 22:15:58 +00:00
|
|
|
virtual void setVRCameraOffsetTransform(const float offset[16]);
|
2016-07-09 22:09:09 +00:00
|
|
|
virtual void disableVRCamera();
|
2016-09-08 22:15:58 +00:00
|
|
|
|
2016-07-09 22:09:09 +00:00
|
|
|
virtual bool isVRCamera() const;
|
2016-05-19 16:19:36 +00:00
|
|
|
|
2015-04-16 16:55:32 +00:00
|
|
|
virtual void getCameraTargetPosition(float pos[3]) const;
|
|
|
|
virtual void getCameraPosition(float pos[3]) const;
|
|
|
|
|
2015-04-29 20:21:26 +00:00
|
|
|
virtual void getCameraTargetPosition(double pos[3]) const;
|
|
|
|
virtual void getCameraPosition(double pos[3]) const;
|
|
|
|
|
|
|
|
|
2015-04-16 16:55:32 +00:00
|
|
|
virtual void setCameraTargetPosition(float x,float y,float z);
|
|
|
|
virtual void setCameraDistance(float dist);
|
2015-04-16 22:16:13 +00:00
|
|
|
virtual float getCameraDistance() const;
|
|
|
|
|
2015-04-16 16:55:32 +00:00
|
|
|
virtual void setCameraUpVector(float x,float y, float z);
|
2015-04-16 22:16:13 +00:00
|
|
|
void getCameraUpVector(float up[3]) const;
|
2017-04-10 18:03:41 +00:00
|
|
|
|
|
|
|
void getCameraForwardVector(float fwd[3]) const;
|
|
|
|
|
|
|
|
|
2015-04-16 16:55:32 +00:00
|
|
|
///the setCameraUpAxis will call the 'setCameraUpVector' and 'setCameraForwardVector'
|
|
|
|
virtual void setCameraUpAxis(int axis);
|
2015-04-16 22:16:13 +00:00
|
|
|
virtual int getCameraUpAxis() const;
|
|
|
|
|
2015-04-16 16:55:32 +00:00
|
|
|
virtual void setCameraYaw(float yaw);
|
2015-04-16 22:16:13 +00:00
|
|
|
virtual float getCameraYaw() const;
|
|
|
|
|
2015-04-16 16:55:32 +00:00
|
|
|
virtual void setCameraPitch(float pitch);
|
2015-04-16 22:16:13 +00:00
|
|
|
virtual float getCameraPitch() const;
|
2015-04-16 16:55:32 +00:00
|
|
|
|
2015-04-16 22:16:13 +00:00
|
|
|
virtual void setAspectRatio(float ratio);
|
|
|
|
virtual float getAspectRatio() const;
|
2017-02-08 19:34:38 +00:00
|
|
|
|
|
|
|
virtual float getCameraFrustumFar() const;
|
|
|
|
virtual float getCameraFrustumNear() const;
|
2017-05-25 20:39:36 +00:00
|
|
|
|
|
|
|
virtual void setCameraFrustumFar(float far);
|
|
|
|
virtual void setCameraFrustumNear(float near);
|
2015-04-16 16:55:32 +00:00
|
|
|
};
|
|
|
|
|
2017-02-08 19:34:38 +00:00
|
|
|
#endif //SIMPLE_CAMERA_H
|