FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
MeshAccess.hpp
Go to the documentation of this file.
1 #ifndef MESHACCESS_HPP_
2 #define MESHACCESS_HPP_
3 
4 #include <vector>
7 
8 
9 namespace fast {
10 
11 class Mesh;
12 
13 class FAST_EXPORT MeshAccess {
14  public:
15  MeshAccess(
16  std::vector<float>* mCoordinates,
17  std::vector<float>* mNormals,
18  std::vector<float>* mColors,
19  std::vector<uint>* mLines,
20  std::vector<uint>* mTriangles,
21  std::shared_ptr<Mesh> mesh
22  );
23  MeshVertex getVertex(uint i);
24  void setVertex(uint i, MeshVertex);
25  void addVertex(MeshVertex v);
26  MeshTriangle getTriangle(uint i);
27  void setTriangle(uint i, MeshTriangle);
28  void addTriangle(MeshTriangle t);
29  MeshLine getLine(uint i);
30  void setLine(uint i, MeshLine);
31  void addLine(MeshLine l);
32  std::vector<MeshTriangle> getTriangles();
33  std::vector<MeshLine> getLines();
34  std::vector<MeshVertex> getVertices();
35  void release();
36  ~MeshAccess();
37  typedef std::unique_ptr<MeshAccess> pointer;
38  private:
39  std::vector<float>* mCoordinates;
40  std::vector<float>* mNormals;
41  std::vector<float>* mColors;
42  std::vector<uint>* mLines;
43  std::vector<uint>* mTriangles;
44  std::shared_ptr<Mesh> mMesh;
45 };
46 
47 } // end namespace fast
48 
49 
50 #endif /* MESHACCESS_HPP_ */
fast
Definition: AffineTransformation.hpp:7
fast::MeshVertex
Definition: MeshVertex.hpp:10
fast::MeshAccess::pointer
std::unique_ptr< MeshAccess > pointer
Definition: MeshAccess.hpp:37
fast::MeshTriangle
Definition: MeshVertex.hpp:49
fast::MeshLine
Definition: MeshVertex.hpp:44
DataTypes.hpp
MeshVertex.hpp
fast::MeshAccess
Definition: MeshAccess.hpp:13
uint
unsigned int uint
Definition: DataTypes.hpp:16