15 #ifndef niftkBasicTriangle_h
16 #define niftkBasicTriangle_h
20 #include "niftkCoreExports.h"
67 bool HasVertex(
int vi);
71 void ChangeVertex(
int vFrom,
int vTo);
74 void GetVertIndices(
int& v1,
int& v2,
int& v3);
77 const float* GetVert1CoordArray();
79 const float* GetVert2CoordArray();
81 const float* GetVert3CoordArray();
98 const float* GetVert1NormalArray();
100 const float* GetVert2NormalArray();
102 const float* GetVert3NormalArray();
117 float* GetTriNormalArray();
140 int GetVertIndex(
int which);
142 void SetVertIndex(
int which,
int indexVal);
175 mutable float m_TriNormalArray[3];
float GetDParam() const
Returns the'd' is from the plane equation ax + by + cz + d = 0.
Definition: niftkBasicTriangle.h:164
float m_DParam
Definition: niftkBasicTriangle.h:180
void SetTriNormal(BasicVec3D triNorm)
Sets the triangle normal (as Vec3D)
Definition: niftkBasicTriangle.h:113
bool operator==(niftk::BasicVertex const &x, niftk::BasicVertex const &y)
Definition: niftkMeshSmoother.cxx:31
void SetTriNormalX(float nx)
Sets the X component of the triangle normal.
Definition: niftkBasicTriangle.h:127
int GetVert1Index() const
Returns the index of the first member vertex.
Definition: niftkBasicTriangle.h:145
GLfloat GLfloat v1
Definition: glew.h:1836
int m_Vert2
Definition: niftkBasicTriangle.h:171
GLfloat GLfloat GLfloat v2
Definition: glew.h:1840
bool IsActive() const
Returns true if the triangle active, false if it was removed from the mesh.
Definition: niftkBasicTriangle.h:63
int m_Index
Definition: niftkBasicTriangle.h:183
const BasicVec3D & GetTriNormal() const
Gets const refernece to the triangle normal (as Vec3D)
Definition: niftkBasicTriangle.h:115
GLdouble GLdouble t
Definition: glew.h:1382
std::ostream & operator<<(std::ostream &os, const CSVRow &data)
Definition: niftkCSVRow.h:89
GLdouble GLdouble GLdouble b
Definition: glew.h:7885
float GetTriNormalY()
Gets the Y component of the triangle normal.
Definition: niftkBasicTriangle.h:122
int GetVert2Index() const
Returns the index of the second member vertex.
Definition: niftkBasicTriangle.h:147
int m_Vert1
Definition: niftkBasicTriangle.h:170
int m_Vert3
Definition: niftkBasicTriangle.h:172
BasicMesh * m_Mesh
Definition: niftkBasicTriangle.h:182
void SetVert1Index(int v1)
Sets the index of the first member vertex.
Definition: niftkBasicTriangle.h:152
void SetVert3Index(int v3)
Sets the index of the third member vertex.
Definition: niftkBasicTriangle.h:156
Simple vertex implementation that is used in the Surface Extraction and surface smoothing and decimat...
Definition: niftkBasicVertex.h:77
int GetVert3Index() const
Returns the index of the third member vertex.
Definition: niftkBasicTriangle.h:149
void SetTriNormalZ(float nz)
Sets the Z component of the triangle normal.
Definition: niftkBasicTriangle.h:131
void SetVert2Index(int v2)
Sets the index of the second member vertex.
Definition: niftkBasicTriangle.h:154
void SetIndex(int i)
Sets the index of the current triangle.
Definition: niftkBasicTriangle.h:161
bool m_Active
Definition: niftkBasicTriangle.h:181
GLfloat GLfloat GLfloat GLfloat nx
Definition: glew.h:14135
GLhalf GLhalf nz
Definition: glew.h:11437
Simple mesh implementation that is used in the Surface Extraction and surface smoothing and decimatio...
Definition: niftkBasicMesh.h:31
void ChangeMesh(BasicMesh *mp)
Changes the mesh pointer to the specified one.
Definition: niftkBasicTriangle.h:60
float GetTriNormalZ()
Gets the Z component of the triangle normal.
Definition: niftkBasicTriangle.h:124
int GetIndex() const
Returns the index of the current triangle.
Definition: niftkBasicTriangle.h:159
Simple triangle implementation that is used in the Surface Extraction and surface smoothing and decim...
Definition: niftkBasicTriangle.h:34
GLhalf ny
Definition: glew.h:11437
GLfloat GLfloat GLfloat GLfloat v3
Definition: glew.h:1844
void SetTriNormalY(float ny)
Sets the Y component of the triangle normal.
Definition: niftkBasicTriangle.h:129
Simple 3D Vector implementation that is used in the Surface Extraction and surface smoothing and deci...
Definition: niftkBasicVec3D.h:30
void SetDParam(float d)
Sets the'd' parameter of the plane equation ax + by + cz + d = 0.
Definition: niftkBasicTriangle.h:166
BasicVec3D m_TriNormal
Definition: niftkBasicTriangle.h:174
float GetTriNormalX()
Gets the X component of the triangle normal.
Definition: niftkBasicTriangle.h:120
Definition: niftkExceptionObject.h:21
void SetActive(bool b)
Sets the active status of the triangle. False = triangle was removed.
Definition: niftkBasicTriangle.h:65