00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef __SGL_PERSPECTIVE_CAMERA_HPP
00027 #define __SGL_PERSPECTIVE_CAMERA_HPP
00028
00029 #include <sglCamera.hpp>
00030
00057 class SGL_DLL_API sglPerspectiveCamera : public sglCamera
00058 {
00059 public:
00061 sglPerspectiveCamera();
00062
00064 virtual ~sglPerspectiveCamera();
00065
00081 bool setFOV(double fovy, double aspect, double near_clip, double far_clip);
00082
00088 bool getFOV(double &fovy, double &aspect,
00089 double &near_clip, double &far_clip) const;
00090
00092 double getFOVY() const { return m_frustum.getFOVY(); }
00094 double getFOVX() const { return m_fovx; }
00095
00108 void setSimple(double left, double right, double bottom, double top,
00109 double near_clip, double far_clip);
00110
00113 void getSimple(double &left, double &right, double &bottom, double &top,
00114 double &near_clip, double &far_clip) const;
00115
00116
00117 virtual void applyProjection() const;
00118
00119
00120 virtual void printInfo(ostream &ostrm, const char *indent_string) const;
00121
00122 protected:
00123 sglPerspectiveCamera(const sglPerspectiveCamera &);
00124 sglPerspectiveCamera &operator=(const sglPerspectiveCamera &);
00125
00126 protected:
00127 bool m_simple_flag;
00128
00129 double m_left;
00130 double m_right;
00131 double m_bottom;
00132 double m_top;
00133
00134 double m_fovx;
00135 };
00136
00137 #endif