CommonCameraInterface.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef COMMON_CAMERA_INTERFACE_H
  2. #define COMMON_CAMERA_INTERFACE_H
  3. struct CommonCameraInterface
  4. {
  5. virtual void getCameraProjectionMatrix(float m[16])const = 0;
  6. virtual void getCameraViewMatrix(float m[16]) const = 0;
  7. virtual void setVRCamera(const float viewMat[16], const float projectionMatrix[16])=0;
  8. virtual void disableVRCamera()=0;
  9. virtual bool isVRCamera() const =0;
  10. virtual void setVRCameraOffsetTransform(const float offset[16])=0;
  11. virtual void getCameraTargetPosition(float pos[3]) const = 0;
  12. virtual void getCameraPosition(float pos[3]) const = 0;
  13. virtual void getCameraTargetPosition(double pos[3]) const = 0;
  14. virtual void getCameraPosition(double pos[3]) const = 0;
  15. virtual void setCameraTargetPosition(float x,float y,float z) = 0;
  16. virtual void setCameraDistance(float dist) = 0;
  17. virtual float getCameraDistance() const = 0;
  18. virtual void setCameraUpVector(float x,float y, float z) = 0;
  19. virtual void getCameraUpVector(float up[3]) const = 0;
  20. ///the setCameraUpAxis will call the 'setCameraUpVector' and 'setCameraForwardVector'
  21. virtual void setCameraUpAxis(int axis) = 0;
  22. virtual int getCameraUpAxis() const = 0;
  23. virtual void setCameraYaw(float yaw) = 0;
  24. virtual float getCameraYaw() const = 0;
  25. virtual void setCameraPitch(float pitch) = 0;
  26. virtual float getCameraPitch() const = 0;
  27. virtual void setAspectRatio(float ratio) = 0;
  28. virtual float getAspectRatio() const = 0;
  29. };
  30. #endif //COMMON_CAMERA_INTERFACE_H