FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
MeshVertex.hpp
Go to the documentation of this file.
1 #ifndef MESHVERTEX_HPP_
2 #define MESHVERTEX_HPP_
3 
4 #include "DataTypes.hpp"
5 #include "Color.hpp"
6 #include <vector>
7 
8 namespace fast {
9 
10 class FAST_EXPORT MeshVertex {
11  public:
12  MeshVertex(Vector3f position, Vector3f normal = Vector3f(1, 0, 0), Color color = Color::Green());
13  Vector3f getPosition() const;
14  Vector3f getNormal() const;
15  void setPosition(Vector3f position);
16  void setNormal(Vector3f normal);
17  void setLabel(int label);
18  int getLabel() const;
19  void setColor(Color color);
20  Color getColor() const;
21  private:
22  Vector3f mPosition;
23  Vector3f mNormal;
24  Color mColor;
25  int mLabel;
26 };
27 
28 class FAST_EXPORT MeshConnection {
29  public:
30  int getEndpoint(uint index);
31  int getEndpoint1();
32  int getEndpoint2();
33  Color getColor();
34  void setEndpoint(int endpointIndex, int vertexIndex);
35  void setEndpoint1(uint index);
36  void setEndpoint2(uint index);
37  void setColor(Color color);
38  protected:
42 };
43 
44 class FAST_EXPORT MeshLine : public MeshConnection {
45  public:
46  MeshLine(uint endpoint1, uint endpoint2, Color color = Color::Red());
47 };
48 
49 class FAST_EXPORT MeshTriangle : public MeshConnection {
50  public:
51  MeshTriangle(uint endpoint1, uint endpoint2, uint endpoint3, Color color = Color::Red());
52  int getEndpoint3();
53  void setEndpoint3(uint index);
54 };
55 
56 } // end namespace fast
57 
58 #endif /* SURFACEVERTEX_HPP_ */
fast::Color::Green
static Color Green()
Definition: Color.hpp:52
fast
Definition: AffineTransformation.hpp:7
fast::MeshConnection::mEndpoints
VectorXui mEndpoints
Definition: MeshVertex.hpp:39
fast::VectorXui
Eigen::Matrix< uint, Eigen::Dynamic, 1 > VectorXui
Definition: DataTypes.hpp:33
fast::Color::Red
static Color Red()
Definition: Color.hpp:49
fast::MeshVertex
Definition: MeshVertex.hpp:10
fast::MeshConnection::mColor
Color mColor
Definition: MeshVertex.hpp:40
fast::MeshConnection::MeshConnection
MeshConnection()
Definition: MeshVertex.hpp:41
fast::MeshTriangle
Definition: MeshVertex.hpp:49
fast::MeshConnection
Definition: MeshVertex.hpp:28
fast::MeshLine
Definition: MeshVertex.hpp:44
DataTypes.hpp
Color.hpp
uint
unsigned int uint
Definition: DataTypes.hpp:16
fast::Color
Definition: Color.hpp:8