Revision 2609,
1001 bytes
checked in by mattausch, 17 years ago
(diff) |
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[68] | 1 | #ifndef _Mesh_H__ |
---|
| 2 | #define _Mesh_H__ |
---|
| 3 | |
---|
| 4 | #include <vector> |
---|
| 5 | #include "Plane3.h" |
---|
| 6 | |
---|
| 7 | namespace 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 | |
---|
[2609] | 18 | /** Mesh containing polygonal patches |
---|
| 19 | */ |
---|
[68] | 20 | class Mesh { |
---|
| 21 | public: |
---|
| 22 | /// default vertex container for Mesh |
---|
| 23 | typedef std::vector<Vector3> VertexContainer; |
---|
| 24 | /// default patch container for Mesh |
---|
| 25 | typedef std::vector<Patch *> PatchContainer; |
---|
| 26 | |
---|
| 27 | /// Default constructor |
---|
| 28 | Mesh():mVertices(), mPatches() {} |
---|
| 29 | |
---|
| 30 | /// Constructor with container preallocation |
---|
| 31 | Mesh(const int vertices, |
---|
| 32 | const int patches):mVertices(), |
---|
| 33 | mPatches() |
---|
| 34 | { |
---|
| 35 | mVertices.reserve(vertices); |
---|
| 36 | mPatches.reserve(patches); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | protected: |
---|
| 40 | /** Vertices forming the mesh */ |
---|
| 41 | VertexContainer mVertices; |
---|
| 42 | /** Patches forming the mesh */ |
---|
| 43 | PatchContainer mPatches; |
---|
| 44 | }; |
---|
| 45 | |
---|
| 46 | }; |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.