From 81787e9004377016236865e95b95707ed6cf1d0b Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 2 Mar 2008 12:23:48 +0000 Subject: initial (buggy) support for .map models --- src/render/face.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/render/face.h (limited to 'src/render/face.h') diff --git a/src/render/face.h b/src/render/face.h new file mode 100644 index 0000000..d44b1d0 --- /dev/null +++ b/src/render/face.h @@ -0,0 +1,39 @@ +/* + render/face.h + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 +*/ + +#ifndef __INCLUDED_RENDER_FACE_H__ +#define __INCLUDED_RENDER_FACE_H__ + +#include + +#include "math/mathlib.h" + +namespace render { + +/// one face (polygon) of a model +class Face { +public: + Face(math::Vector3f const & normal); + ~Face(); + + /// the normal of this face + inline math::Vector3f const & normal() const { return face_normal; }; + + /// add a vertex to the face + void add_vertex(math::Vector3f const &vertex); + + /// draw the polygon + void draw(); + +private: + math::Vector3f face_normal; + std::vector face_vertex; +}; + +} + +#endif // __INCLUDED_RENDER_FACE_H__ + -- cgit v1.2.3