]> git.tdb.fi Git - libs/gl.git/blobdiff - source/camera.h
Alias texture lookup functions of all dimensionalities
[libs/gl.git] / source / camera.h
index 634557607c112abdd619e622203cfafe1b9eddd0..9a525e6b1d51077af5f06874ba0a4a56a3b6505d 100644 (file)
@@ -11,6 +11,7 @@ class Camera
 {
 private:
        Geometry::Angle<float> fov;
+       float height;
        float aspect;
        // Some compilers have "near" and "far" keywords
        float clip_near;
@@ -22,11 +23,13 @@ private:
        Vector3 up_dir;
        Matrix view_matrix;
        Matrix object_matrix;
+       Matrix proj_matrix;
 
 public:
        Camera();
 
        void set_field_of_view(const Geometry::Angle<float> &);
+       void set_orthographic(float, float);
        void set_aspect(float);
        void set_depth_clip(float, float);
        void set_frustum_axis(float, float);
@@ -54,6 +57,9 @@ public:
        to world space. */
        const Matrix &get_object_matrix() const { return object_matrix; }
 
+       /** Returns the projection matrix. */
+       const Matrix &get_projection_matrix() const { return proj_matrix; }
+
        Vector3 project(const Vector4 &) const;
        Vector3 project(const Vector3 &) const;
        Vector4 unproject(const Vector4 &) const;
@@ -61,6 +67,7 @@ public:
        void apply() const;
 
 private:
+       void update_projection_matrix();
        void update_object_matrix();
 };