Geom Software - C++ Programming and Geometry Libraries
WOF Documentation pages v1.10
Mesh.h
1 // Copyright (C) Geom Software e.U, Bernhard Kornberger, Graz/Austria
2 //
3 // This file is part of the WOF software. WOF is commercial software.
4 // Users holding a license may use this file in accordance with the
5 // License Agreement.
6 //
7 // This software is provided AS IS with NO WARRANTY OF ANY KIND,
8 // INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
9 // FOR A PARTICULAR PURPOSE.
10 //
11 // Please contact the author if any conditions of this licensing are
12 // not clear to you.
13 //
14 // Author: Bernhard Kornberger, bkorn (at) geom.at
15 // http://www.geom.at
16 
17 #pragma once
18 
19 #include <vector>
20 #include <memory>
21 #include "Point3.h"
22 
23 namespace GEOM_WOF {
24 
25 
26 class RMesh; // FWD
27 class Mesh; // FWD
28 
30 typedef std::shared_ptr<Mesh> MeshPtr;
31 
32 
37 class CLASS_DECLSPEC Mesh
38 {
39 public:
42  Mesh(RMesh* pRMesh);
45  ~Mesh();
46  Mesh(const Mesh&)=delete;
47  Mesh& operator=(const Mesh&)=delete;
48 
55  void getTriangles(std::vector<Point3*>& vTriangleCorners) const;
60  void getPoints(std::vector<Point3*>& vPoints) const;
73  void getVertexIndexData(std::vector<Point3*>& vVertices,
74  std::vector<int>& vCornerIndices) const;
81  bool writePly_BIN(const std::string& name) const;
88  bool writePly_ASCII(const std::string& name) const;
95  bool writeGeomview_ASCII(const std::string& name) const;
103  bool writeStl_ASCII(const std::string& name) const;
110  void printStatistics(const std::string& name) const;
115  double getAverageEdgeLength() const;
116 
117 
119  RMesh* getRMesh();
120 
121 private:
122  RMesh* pRMesh;
123 };
124 
125 
126 
127 } // NAMESPACE
128 
129 
3D Mesh class
Definition: Mesh.h:38
~Mesh()
Destructor.
bool writeStl_ASCII(const std::string &name) const
Write STL (ASCII)
Mesh(RMesh *pRMesh)
Constructor.
void getTriangles(std::vector< Point3 * > &vTriangleCorners) const
Get Triangles.
bool writePly_BIN(const std::string &name) const
Write Ply (Binary)
bool writeGeomview_ASCII(const std::string &name) const
Write Geomview.
void printStatistics(const std::string &name) const
Print Statistics.
void getVertexIndexData(std::vector< Point3 * > &vVertices, std::vector< int > &vCornerIndices) const
Get the Mesh as Vertices and Indices.
bool writePly_ASCII(const std::string &name) const
Write Ply (ASCII)
void getPoints(std::vector< Point3 * > &vPoints) const
Get Points.
double getAverageEdgeLength() const
Get the average edge length.
Definition: Point3.h:23
std::shared_ptr< Mesh > MeshPtr
Definition: Mesh.h:27