source: GTP/trunk/Lib/Vis/Preprocessing/include/Mesh.h @ 68

Revision 68, 998 bytes checked in by bittner, 20 years ago (diff)

Added include files

  • Property svn:executable set to *
Line 
1#ifndef _Mesh_H__
2#define _Mesh_H__
3
4#include <vector>
5#include "Plane3.h"
6
7namespace GtpVisibilityPreprocessor {
8
9  /** Patch used as an element of the mesh */
10  class Patch {
11  public:
12    Patch():mVertices() {}
13  protected:
14    /// list of vertex pointers
15    vector<Vector3 *> mVertices;
16  };
17
18  /** Mesh containing polygonal patches */
19  class Mesh {
20  public:
21    /// default vertex container for Mesh
22    typedef std::vector<Vector3> VertexContainer;
23    /// default patch container for Mesh
24    typedef std::vector<Patch *> PatchContainer;
25
26    /// Default constructor
27    Mesh():mVertices(), mPatches() {}
28
29    /// Constructor with container preallocation
30    Mesh(const int vertices,
31         const int patches):mVertices(),
32                            mPatches()
33    {
34      mVertices.reserve(vertices);
35      mPatches.reserve(patches);
36    }
37   
38  protected:
39    /** Vertices forming the mesh */
40    VertexContainer mVertices;
41    /** Patches forming the mesh */
42    PatchContainer mPatches;
43  };
44 
45};
46
47
48
49#endif
Note: See TracBrowser for help on using the repository browser.