diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-12-24 23:17:51 +0100 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-12-24 23:17:51 +0100 |
commit | d1c909ca57b1685d8c4303d1ff9018fdb152f889 (patch) | |
tree | 3cca2c7ac48f23bcc12f334c8367a3ab38dd5e3a /src/MathUtil.h | |
parent | c883f50f90d6f0fcfa3bee94e974ede149c35ca6 (diff) | |
download | zoom++-d1c909ca57b1685d8c4303d1ff9018fdb152f889.tar zoom++-d1c909ca57b1685d8c4303d1ff9018fdb152f889.zip |
Refactored Ray
Diffstat (limited to 'src/MathUtil.h')
-rw-r--r-- | src/MathUtil.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/MathUtil.h b/src/MathUtil.h index 9e6efc7..892d5dc 100644 --- a/src/MathUtil.h +++ b/src/MathUtil.h @@ -87,6 +87,24 @@ class MathUtil { float d; }; + class Ray { + public: + Ray() : vertex(vmml::vec3f::ZERO), dir(vmml::vec3f::ZERO) {} + Ray(const vmml::vec3f &v, const vmml::vec3f &d) : vertex(v), dir(d) {} + + const vmml::vec3f& getVertex() const { + return vertex; + } + + const vmml::vec3f& getDirection() const { + return dir; + } + + private: + vmml::vec3f vertex; + vmml::vec3f dir; + }; + static vmml::mat4f perspective(float fovy, float aspect, float zNear); private: |