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;
|
2017-01-06 01:41:58 +00:00
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
virtual void setVRCamera(const float viewMat[16], const float projectionMatrix[16]);
|
|
|
|
virtual bool getVRCamera(float viewMat[16], float projectionMatrix[16]);
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
virtual void setCameraTargetPosition(float x, float y, float z);
|
|
|
|
virtual void setCameraDistance(float dist);
|
|
|
|
virtual float getCameraDistance() const;
|
2015-04-29 20:21:26 +00:00
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
virtual void setCameraUpVector(float x, float y, float z);
|
|
|
|
void getCameraUpVector(float up[3]) const;
|
2017-04-10 18:03:41 +00:00
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
void getCameraForwardVector(float fwd[3]) const;
|
2017-04-10 18:03:41 +00:00
|
|
|
|
2015-04-16 16:55:32 +00:00
|
|
|
///the setCameraUpAxis will call the 'setCameraUpVector' and 'setCameraForwardVector'
|
2018-09-23 21:17:31 +00:00
|
|
|
virtual void setCameraUpAxis(int axis);
|
|
|
|
virtual int getCameraUpAxis() const;
|
|
|
|
|
|
|
|
virtual void setCameraYaw(float yaw);
|
|
|
|
virtual float getCameraYaw() const;
|
2015-04-16 22:16:13 +00:00
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
virtual void setCameraPitch(float pitch);
|
|
|
|
virtual float getCameraPitch() const;
|
2015-04-16 22:16:13 +00:00
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
virtual void setAspectRatio(float ratio);
|
|
|
|
virtual float getAspectRatio() const;
|
2015-04-16 16:55:32 +00:00
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
virtual float getCameraFrustumFar() const;
|
|
|
|
virtual float getCameraFrustumNear() const;
|
2017-05-25 20:39:36 +00:00
|
|
|
|
|
|
|
virtual void setCameraFrustumFar(float far);
|
2018-09-23 21:17:31 +00:00
|
|
|
virtual void setCameraFrustumNear(float near);
|
2015-04-16 16:55:32 +00:00
|
|
|
};
|
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
#endif //SIMPLE_CAMERA_H
|