Nektar++
Public Member Functions | Public Attributes | List of all members
Vertex Struct Reference

Represents a vertex in the mesh. More...

Public Member Functions

 Vertex (double pX, double pY, double pZ, double pScalar, double factor)
 
bool operator== (const Vertex &v)
 

Public Attributes

int x
 
int y
 
int z
 
double scalar
 

Detailed Description

Represents a vertex in the mesh.

Each vertex has a 3-component coordinate and a scalar value associated with it. The factor provides a mechanism to specify precision of the coordinate comparison. Although coordinates are provided as floating-point numbers, they are stored as integers. The integer value is computed as floor (x * factor) Therefore a factor of 100 would ensure a precision of 0.01 in the comparison.

Definition at line 74 of file VtkToFld.cpp.

Constructor & Destructor Documentation

◆ Vertex()

Vertex::Vertex ( double  pX,
double  pY,
double  pZ,
double  pScalar,
double  factor 
)
inline

Definition at line 76 of file VtkToFld.cpp.

77 : x((int)floor(pX * factor)), y((int)floor(pY * factor)),
78 z((int)floor(pZ * factor)), scalar(pScalar)
79 {
80 }
int y
Definition: VtkToFld.cpp:83
int z
Definition: VtkToFld.cpp:84
double scalar
Definition: VtkToFld.cpp:85
int x
Definition: VtkToFld.cpp:82

Member Function Documentation

◆ operator==()

bool Vertex::operator== ( const Vertex v)
inline

Definition at line 87 of file VtkToFld.cpp.

88 {
89 return (x == v.x && y == v.y && z == v.z);
90 }

References x, y, and z.

Member Data Documentation

◆ scalar

double Vertex::scalar

Definition at line 85 of file VtkToFld.cpp.

◆ x

int Vertex::x

Definition at line 82 of file VtkToFld.cpp.

Referenced by operator==().

◆ y

int Vertex::y

Definition at line 83 of file VtkToFld.cpp.

Referenced by operator==().

◆ z

int Vertex::z

Definition at line 84 of file VtkToFld.cpp.

Referenced by operator==().