Struct Vertex

Inheritance Relationships

Derived Types

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 Vertex(Vector &v)

Constructor seeded from a Vector.

Parameters

v[in] Vector position

inline Vertex(Vector &&v)

Move construct a vertex from vector.

Parameters

v – Vector position

inline Vertex(const Vertex &x)

Copy Constructor.

Parameters

x[in] Vertex to copy

inline Vertex(const Vertex &&x)

Move Constructor.

Parameters

x[in] Vertex to move

inline operator Vector() const

Implicit cast of Vertex to Vector type.

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

inline Vertex &operator*=(const REAL x)

Multiply the Vertex by a scalar.

Parameters

x[in] The scalar to multiply by

Returns

Post multiplied vertex

inline Vertex &operator/=(const REAL x)

Divide the Vertex by a scalar.

Parameters

x[in] Scalar to divide by

Returns

Post divided vertex

Public Members

Vector position

a 3 tensor for x, y, z

int marker = 0

Boundary marking ID.

bool selected = false

Selection flag.

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