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/ShadowVolume.h | |
parent | c883f50f90d6f0fcfa3bee94e974ede149c35ca6 (diff) | |
download | zoom++-d1c909ca57b1685d8c4303d1ff9018fdb152f889.tar zoom++-d1c909ca57b1685d8c4303d1ff9018fdb152f889.zip |
Refactored Ray
Diffstat (limited to 'src/ShadowVolume.h')
-rw-r--r-- | src/ShadowVolume.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/ShadowVolume.h b/src/ShadowVolume.h index 445e7ba..a7b276c 100644 --- a/src/ShadowVolume.h +++ b/src/ShadowVolume.h @@ -20,8 +20,7 @@ #ifndef ZOOM_SHADOWVOLUME_H_ #define ZOOM_SHADOWVOLUME_H_ -#include <vmmlib/vector.hpp> -#include <vmmlib/matrix.hpp> +#include "MathUtil.h" namespace Zoom { @@ -32,12 +31,8 @@ class ShadowVolume { ShadowVolume(const Triangle &t, const vmml::vec3f &lightPos); virtual ~ShadowVolume() {} - const vmml::vec3f& getVertex(int i) const { - return rays[i].p; - } - - const vmml::vec3f& getDirection(int i) const { - return rays[i].dir; + const MathUtil::Ray& getRay(int i) const { + return rays[i]; } bool isVisible() const { @@ -47,10 +42,7 @@ class ShadowVolume { private: bool visible; - struct Ray { - vmml::vec3f p; - vmml::vec3f dir; - } rays[3]; + MathUtil::Ray rays[3]; }; } |