Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/face.cc')
-rw-r--r--src/core/face.cc53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/core/face.cc b/src/core/face.cc
deleted file mode 100644
index 31b7fcc..0000000
--- a/src/core/face.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- render/face.cc
- This file is part of the Osirion project and is distributed under
- the terms of the GNU General Public License version 2
-*/
-
-#include "render/face.h"
-#include "render/gl.h"
-
-namespace render {
-
-Face::Face(math::Vector3f const & normal, math::Color const *color) :
- face_normal(normal)
-{
- face_normal.normalize();
-
- if (color)
- face_color = new math::Color(*color);
- else
- face_color = 0;
-}
-
-Face::~Face()
-{
- for (std::vector<math::Vector3f *>::iterator it = face_vertex.begin(); it != face_vertex.end(); it++) {
- delete (*it);
- }
-
- face_vertex.clear();
-
- if (face_color)
- delete face_color;
-}
-
-void Face::add_vertex(math::Vector3f const & vertex)
-{
- math::Vector3f *v = new math::Vector3f(vertex);
-
- face_vertex.push_back(v);
-}
-
-void Face::draw()
-{
- //gl::begin(gl::LineLoop);
- gl::begin(gl::Polygon);
- gl::normal(face_normal); // face_normal already has unit lenght
- for (std::vector<math::Vector3f *>::iterator it = face_vertex.begin(); it != face_vertex.end(); it++) {
- gl::vertex(*(*it));
- }
- gl::end();
-}
-
-}