X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcamera.h;h=bfcc2987d860b8e258e3f4fa6bcaad3906853295;hb=fcd9e657d0c86cfa4c5bb951ccad2ff5f242863a;hp=634557607c112abdd619e622203cfafe1b9eddd0;hpb=c6149a1e9f488f790378969ff655e6bc94369d16;p=libs%2Fgl.git diff --git a/source/camera.h b/source/camera.h index 63455760..bfcc2987 100644 --- a/source/camera.h +++ b/source/camera.h @@ -22,6 +22,7 @@ private: Vector3 up_dir; Matrix view_matrix; Matrix object_matrix; + Matrix proj_matrix; public: Camera(); @@ -54,6 +55,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 +65,7 @@ public: void apply() const; private: + void update_projection_matrix(); void update_object_matrix(); };