From d1c909ca57b1685d8c4303d1ff9018fdb152f889 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 24 Dec 2009 23:17:51 +0100 Subject: Refactored Ray --- src/MathUtil.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/MathUtil.h') 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: -- cgit v1.2.3