15 #ifndef niftkBasicVertex_h
16 #define niftkBasicVertex_h
21 #include "niftkCoreExports.h"
121 const float* GetCoordArray()
const;
138 const float GetCoordX()
const {
return m_Coords.GetX(); }
140 const float GetCoordY()
const {
return m_Coords.GetY(); }
142 const float GetCoordZ()
const {
return m_Coords.GetZ(); }
151 const float* GetNormalArray()
const;
197 bool HasVertNeighbor(
int v)
const {
return (m_VertNeighbors.find(v) != m_VertNeighbors.end()); }
199 bool HasTriNeighbor(
int t)
const {
return (m_TriNeighbors.find(t) != m_TriNeighbors.end()); }
233 void GetAllBorderEdges(std::set<Border> &borderSet,
BasicMesh&
m);
237 void CalcQuadric(
BasicMesh&
m,
bool bUseTriArea);
239 void GetQuadric(
double Qret[4][4]);
241 void SetQuadric(
double Qnew[4][4]);
257 std::set<int> m_VertNeighbors;
258 std::set<int> m_TriNeighbors;
263 int m_MinCostNeighbor;
266 double m_QuadricError[4][4];
267 double m_QuadricTriArea;
269 mutable float m_V[3];
270 mutable float m_VN[3];
float GetCoordZ()
Get Z coordinate of the vertex.
Definition: niftkBasicVertex.h:135
bool HasTriNeighbor(int t) const
Check is vertex has a certain triangle neighbour.
Definition: niftkBasicVertex.h:199
GLdouble GLdouble z
Definition: glew.h:1543
float GetNormalZ()
Get Z coordinate of the vertex normal.
Definition: niftkBasicVertex.h:165
const float GetCoordZ() const
Get Z coordinate of the vertex - const.
Definition: niftkBasicVertex.h:142
bool IsActive() const
Returns the flag value that indicates if the vertex is active (true) or it was removed (false) from t...
Definition: niftkBasicVertex.h:220
const float GetNormalZ() const
Get Z coordinate of the vertex normal - const.
Definition: niftkBasicVertex.h:172
const float GetNormalX() const
Get X coordinate of the vertex normal - const.
Definition: niftkBasicVertex.h:168
int GetIndex() const
Get index of the current vertex.
Definition: niftkBasicVertex.h:215
int GetMinCostEdgeVert() const
Returns the index of the vertex that is at other end of the min. cost edge (used in mesh simplificati...
Definition: niftkBasicVertex.h:207
const std::set< int > & GetTriNeighbors() const
Get the whole set of triangle neighbours - const.
Definition: niftkBasicVertex.h:192
bool operator==(niftk::BasicVertex const &x, niftk::BasicVertex const &y)
Definition: niftkMeshSmoother.cxx:31
float GetCoordX()
Get X coordinate of the vertex.
Definition: niftkBasicVertex.h:131
void AddVertNeighbor(int v)
Add neighbor - a vertex that is connected by an edge.
Definition: niftkBasicVertex.h:175
GLfloat GLfloat v1
Definition: glew.h:1836
unsigned RemoveTriNeighbor(int t)
Remove triangle if it no longer uses this vertex.
Definition: niftkBasicVertex.h:184
bool operator<(const GoldStandardPoint &GSP1, const GoldStandardPoint &GSP2)
Definition: mitkOpenCVPointTypes.cxx:125
const BasicVec3D & GetNormal() const
Get normal as 3D vector - const.
Definition: niftkBasicVertex.h:149
GLfloat GLfloat GLfloat v2
Definition: glew.h:1840
void SetEdgeRemoveCost(double f)
Sets the edge remove costs that is used in mesh simplification.
Definition: niftkBasicVertex.h:204
int vert1
Definition: niftkBasicVertex.h:32
GLint GLint GLint GLint GLint GLint y
Definition: glew.h:1236
unsigned RemoveVertNeighbor(int v)
Remove a vertex which is no longer connected by an edge.
Definition: niftkBasicVertex.h:178
void SetNormalY(float y)
Set Y coordinate of the vertex normal individually.
Definition: niftkBasicVertex.h:156
std::set< int > & GetVertNeighbors()
Definition: niftkBasicVertex.h:189
GLdouble GLdouble t
Definition: glew.h:1382
int vert2
Definition: niftkBasicVertex.h:33
std::ostream & operator<<(std::ostream &os, const CSVRow &data)
Definition: niftkCSVRow.h:89
void SetCoords(const BasicVec3D &v)
Set coordinates as 3D vector.
Definition: niftkBasicVertex.h:115
float GetCoordY()
Get Y coordinate of the vertex.
Definition: niftkBasicVertex.h:133
GLdouble GLdouble GLdouble b
Definition: glew.h:7885
void SetCoordY(float y)
Set Y coordinate of the vertex individually.
Definition: niftkBasicVertex.h:126
bool HasVertNeighbor(int v) const
Check is vertex has a certain vertex neighbour.
Definition: niftkBasicVertex.h:197
float GetNormalX()
Get X coordinate of the vertex normal.
Definition: niftkBasicVertex.h:161
const GLdouble * v
Definition: glew.h:1375
void SetCoordZ(float z)
Set Z coordinate of the vertex individually.
Definition: niftkBasicVertex.h:128
bool operator<(const Border &b) const
Definition: niftkBasicVertex.h:38
float GetNormalY()
Get Y coordinate of the vertex normal.
Definition: niftkBasicVertex.h:163
double GetCost() const
Returns the cost of removing this vertex from the mesh.
Definition: niftkBasicVertex.h:212
void SetNormal(const BasicVec3D &vn)
Set normal as 3D vector.
Definition: niftkBasicVertex.h:145
void SetCoordX(float x)
Set X coordinate of the vertex individually.
Definition: niftkBasicVertex.h:124
Simple vertex implementation that is used in the Surface Extraction and surface smoothing and decimat...
Definition: niftkBasicVertex.h:77
const float GetCoordX() const
Get X coordinate of the vertex - const.
Definition: niftkBasicVertex.h:138
void SetMinCostEdgeVert(int i)
Sets the index of the vertex that is at other end of the min. cost edge (used in mesh simplification)...
Definition: niftkBasicVertex.h:209
double GetQuadricSummedTriArea()
Gets the quadric cost function summed over the triangle area.
Definition: niftkBasicVertex.h:244
std::set< int > & GetTriNeighbors()
Get the whole set of triangle neighbours.
Definition: niftkBasicVertex.h:194
GLint GLint GLint GLint GLint x
Definition: glew.h:1236
void SetActive(bool b)
Sets a flag the flag that indicates if the vertex is active (true) or it was removed (false) from the...
Definition: niftkBasicVertex.h:222
const float GetCoordY() const
Get Y coordinate of the vertex - const.
Definition: niftkBasicVertex.h:140
void SetQuadricSummedTriArea(double newArea)
Sets the quadric cost function summed over the triangle area.
Definition: niftkBasicVertex.h:246
const std::set< int > & GetVertNeighbors() const
Get the whole set of vertex neighbours - const.
Definition: niftkBasicVertex.h:187
Simple mesh implementation that is used in the Surface Extraction and surface smoothing and decimatio...
Definition: niftkBasicMesh.h:31
const GLdouble * m
Definition: glew.h:7887
void AddTriNeighbor(int t)
Add a triangle neighbor - a triangle which uses this vertex.
Definition: niftkBasicVertex.h:181
void SetNormalZ(float z)
Set Z coordinate of the vertex normal individually.
Definition: niftkBasicVertex.h:158
double GetEdgeRemoveCost()
Returns the edge remove costs that is used in mesh simplification.
Definition: niftkBasicVertex.h:202
BasicVec3D & GetNormal()
Get normal as 3D vector.
Definition: niftkBasicVertex.h:147
const BasicVec3D & GetCoords() const
Set coordinates as 3D vector - const.
Definition: niftkBasicVertex.h:119
void SetNormalX(float x)
Set X coordinate of the vertex normal individually.
Definition: niftkBasicVertex.h:154
Definition: niftkBasicVertex.h:30
Simple 3D Vector implementation that is used in the Surface Extraction and surface smoothing and deci...
Definition: niftkBasicVec3D.h:30
BasicVec3D & GetCoords()
Get coordinates as 3D vector.
Definition: niftkBasicVertex.h:117
const float GetNormalY() const
Get Y coordinate of the vertex normal - const.
Definition: niftkBasicVertex.h:170
Definition: niftkExceptionObject.h:21
void SetIndex(int i)
Set index of the current vertex.
Definition: niftkBasicVertex.h:217
int triIndex
Definition: niftkBasicVertex.h:34
GLclampf f
Definition: glew.h:3136