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 gamer::Vertex¶
Vertex struct represents a general vertex.
Subclassed by gamer::SMVertex, gamer::TMEdge, gamer::TMVertex
Public Functions
-
inline Vertex()¶
Default constructor with x,y,z = 0.
-
inline Vertex(REAL x, REAL y, REAL z)¶
Constructor with initialized position.
- Parameters
x – [in] x-position of the vertex
y – [in] y-position of the vertex
z – [in] z-position of the vertex
-
inline Vertex(REAL x, REAL y, REAL z, int m, bool sel)¶
Constructor with initialized position, marker, and selection.
- Parameters
x – [in] x-position of the vertex
y – [in] y-position of the vertex
z – [in] z-position of the vertex
m – [in] marker ID
sel – [in] selection flag
-
inline std::string to_string() const¶
Returns a string representation of the object.
- Returns
String representation of the object.
-
inline const REAL &operator[](std::size_t index) const¶
Const operator[] overload allows easy access to x, y, z using intuitive syntax.
- Parameters
index – [in] Index to access
- Returns
Reference to the value at the index
-
inline REAL &operator[](std::size_t index)¶
Operator[] overload allows easy access to x, y, z using intuitive syntax.
- Parameters
index – [in] Index to access
- Returns
Reference to the value at the index
-
inline void operator=(const Vertex &v)¶
Assignment operator overload.
- Parameters
v – [in] vertex to assign
-
inline bool operator==(const Vertex &rhs) const¶
Equivalence operator.
- Parameters
rhs – [in] The right hand side
- Returns
True if all values are equal
-
inline bool operator!=(const Vertex &rhs) const¶
Inequivalence operator.
- Parameters
rhs – [in] The right hand side
- Returns
True if not equal
-
inline Vertex &operator+=(const Vector &rhs)¶
Add a vector to the vertex.
- Parameters
rhs – [in] The right hand side
- Returns
Vertex with sum of positions
-
inline Vertex &operator-=(const Vector &rhs)¶
Subtracts a vector from a vertex.
- Parameters
rhs – [in] The right hand side
- Returns
Vertex with difference of positions
Friends
- inline friend friend std::ostream & operator<< (std::ostream &output, const Vertex &v)
Print operator overload.
- Parameters
output – stream to print to
v – [in] Vertex to print
- Returns
the stream
-
inline Vertex()¶