diff options
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: |