summaryrefslogtreecommitdiffstats
path: root/src/Renderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Renderer.cpp')
-rw-r--r--src/Renderer.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Renderer.cpp b/src/Renderer.cpp
index 0f4c4d7..5d86565 100644
--- a/src/Renderer.cpp
+++ b/src/Renderer.cpp
@@ -62,14 +62,14 @@ void Renderer::renderShadowVolume(const ShadowVolume &v) {
if(!v.isVisible())
return;
- glVertex3fv(v.getVertex(2).array);
- glVertex3fv(v.getVertex(1).array);
- glVertex3fv(v.getVertex(0).array);
+ glVertex3fv(v.getRay(2).getVertex().array);
+ glVertex3fv(v.getRay(1).getVertex().array);
+ glVertex3fv(v.getRay(0).getVertex().array);
for(int i = 0; i < 3; ++i) {
- const vmml::vec3f &p1 = v.getVertex(i), &p2 = v.getVertex((i+1)%3);
- vmml::vec4f dir1 = vmml::vec4f(v.getDirection(i), 0);
- vmml::vec4f dir2 = vmml::vec4f(v.getDirection((i+1)%3), 0);
+ const vmml::vec3f &p1 = v.getRay(i).getVertex(), &p2 = v.getRay((i+1)%3).getVertex();
+ vmml::vec4f dir1 = vmml::vec4f(v.getRay(i).getDirection(), 0);
+ vmml::vec4f dir2 = vmml::vec4f(v.getRay((i+1)%3).getDirection(), 0);
glVertex3fv(p1.array);
glVertex3fv(p2.array);
@@ -80,9 +80,9 @@ void Renderer::renderShadowVolume(const ShadowVolume &v) {
glVertex4fv(dir2.array);
}
- glVertex4fv(vmml::vec4f(v.getDirection(0), 0).array);
- glVertex4fv(vmml::vec4f(v.getDirection(1), 0).array);
- glVertex4fv(vmml::vec4f(v.getDirection(2), 0).array);
+ glVertex4fv(vmml::vec4f(v.getRay(0).getDirection(), 0).array);
+ glVertex4fv(vmml::vec4f(v.getRay(1).getDirection(), 0).array);
+ glVertex4fv(vmml::vec4f(v.getRay(2).getDirection(), 0).array);
}
void Renderer::useTexture(unsigned texture) {