Struct Vertex¶
Defined in File Vertex.h
Inheritance Relationships¶
Derived Types¶
public gamer::SMVertex
(Struct SMVertex)public gamer::TMEdge
(Struct TMEdge)public gamer::TMVertex
(Struct TMVertex)
Struct Documentation¶
-
struct
Vertex
¶ Vertex struct represents a general vertex.
Subclassed by gamer::SMVertex, gamer::TMEdge, gamer::TMVertex
Public Functions
-
Vertex
()¶ Default constructor with x,y,z = 0.
-
Vertex
(REAL x, REAL y, REAL z)¶ Constructor with initialized position.
- Parameters
[in] x
: x-position of the vertex[in] y
: y-position of the vertex[in] z
: z-position of the vertex
-
Vertex
(REAL x, REAL y, REAL z, int m, bool sel)¶ Constructor with initialized position, marker, and selection.
- Parameters
[in] x
: x-position of the vertex[in] y
: y-position of the vertex[in] z
: z-position of the vertex[in] m
: marker ID[in] sel
: selection flag
-
std::string
to_string
() const¶ Returns a string representation of the object.
- Return
String representation of the object.
-
const REAL &
operator[]
(std::size_t index) const¶ Const operator[] overload allows easy access to x, y, z using intuitive syntax.
- Return
Reference to the value at the index
- Parameters
[in] index
: Index to access
-
REAL &
operator[]
(std::size_t index)¶ Operator[] overload allows easy access to x, y, z using intuitive syntax.
- Return
Reference to the value at the index
- Parameters
[in] index
: Index to access
-
bool
operator==
(const Vertex &rhs) const¶ Equivalence operator.
- Return
True if all values are equal
- Parameters
[in] rhs
: The right hand side
-
bool
operator!=
(const Vertex &rhs) const¶ Inequivalence operator.
- Return
True if not equal
- Parameters
[in] rhs
: The right hand side
-
Vertex &
operator+=
(const Vector &rhs)¶ Add a vector to the vertex.
- Return
Vertex with sum of positions
- Parameters
[in] rhs
: The right hand side
-
Vertex &
operator-=
(const Vector &rhs)¶ Subtracts a vector from a vertex.
- Return
Vertex with difference of positions
- Parameters
[in] rhs
: The right hand side
-