[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Usata-commits] Changes to usata2/src/gfx/mesh.hpp
From: |
Chong Kai Xiong |
Subject: |
[Usata-commits] Changes to usata2/src/gfx/mesh.hpp |
Date: |
Sun, 09 Jan 2005 14:17:35 -0500 |
Index: usata2/src/gfx/mesh.hpp
diff -u usata2/src/gfx/mesh.hpp:1.2 usata2/src/gfx/mesh.hpp:1.3
--- usata2/src/gfx/mesh.hpp:1.2 Sun Jan 9 09:58:55 2005
+++ usata2/src/gfx/mesh.hpp Sun Jan 9 18:47:01 2005
@@ -9,7 +9,7 @@
// included in the software distribution, or visit
// http://www.fsf.org/licenses/gpl.html.
//
-// $Id: mesh.hpp,v 1.2 2005/01/09 09:58:55 Descender Exp $
+// $Id: mesh.hpp,v 1.3 2005/01/09 18:47:01 Descender Exp $
#ifndef USATA_GFX_MESH_HPP
#define USATA_GFX_MESH_HPP
@@ -23,31 +23,34 @@
namespace usata
{
- namespace gfx
- {
+ namespace gfx
+ {
+ //! \brief Vertex
+ //! \note This struct is suitable for holding GL interleaved
+ //! array elements of format: T4F_C4F_N3F_V4F
struct Vertex
{
- math::Vector4d position;
- math::Vector4d texture;
- math::Vector4d normal;
+ math::Vector4f tex; //!< texture coordinate
+ math::Vector4f color; //!< color
+ math::Vector3f norm; //!< normal
+ math::Vector4f pos; //!< coordinate
};
- class Triangle
+ //! \brief Triangle
+ struct Triangle
{
- public:
- Vertex *vertices[3];
- math::Vector4d plane;
+ int vertices[3]; //!< vertex indices
+ math::Vector4f plane; //!< plane coefficients
};
- typedef boost::tuple<Vertex *, Vertex *> EdgePair;
- typedef boost::tuple<Triangle *, Triangle *> TrianglePair;
-
- class TriangleMeshImpl;
+ typedef boost::tuple<int, int> EdgePair;
+ typedef boost::tuple<int, int> TrianglePair;
+ //! \brief Triangle Mesh
class TriangleMesh
{
public:
- typedef std::vector<Vertex> VertexList;
+ typedef std::vector<Vertex> VertexList;
typedef std::vector<Triangle> TriangleList;
typedef std::map<EdgePair, TrianglePair> EdgeTable;
@@ -79,7 +82,7 @@
compute_edge_table();
};
- } // namespace gfx
+ } // namespace gfx
} // namespace usata