Struct for storing a {GeoId, PointPos} pair. More...
#include <GeoEnum.h>
Public Member Functions | |
constexpr | GeoElementId (int geoId=GeoEnum::GeoUndef, PointPos pos=PointPos::none) |
default constructor initialises object to an undefined (invalid) element. More... | |
bool | isCurve () const |
bool | operator!= (const GeoElementId &obj) const |
inequality operator More... | |
bool | operator== (const GeoElementId &obj) const |
equality operator More... | |
int | posIdAsInt () const |
Public Attributes | |
int | GeoId |
Underlying GeoId (see GeoEnum for definition) More... | |
PointPos | Pos |
Indication of vertex or curve (see PointPos) More... | |
Static Public Attributes | |
static const GeoElementId | HAxis = GeoElementId(GeoEnum::HAxis, PointPos::none) |
GeoElementId of the Horizontal Axis. More... | |
static const GeoElementId | RtPnt = GeoElementId(GeoEnum::RtPnt, PointPos::start) |
GeoElementId of the Root Point. More... | |
static const GeoElementId | VAxis = GeoElementId(GeoEnum::VAxis, PointPos::none) |
GeoElementId of the Vertical Axis. More... | |
Struct for storing a {GeoId, PointPos} pair.
{GeoId, PointPos} is pervasive in the sketcher as means to identify geometry (edges) and geometry elements (vertices).
GeoElementId intends to substitute this pair whenever appropriate. For example in containers and ordered containers.
It has overloaded equality operator and specialised std::less so that it can safely be used in containers, including ordered containers.
|
explicitconstexpr |
default constructor initialises object to an undefined (invalid) element.
bool Sketcher::GeoElementId::isCurve | ( | ) | const |
References Sketcher::none, and Pos.
bool GeoElementId::operator!= | ( | const GeoElementId & | obj | ) | const |
bool GeoElementId::operator== | ( | const GeoElementId & | obj | ) | const |
int Sketcher::GeoElementId::posIdAsInt | ( | ) | const |
References Pos.
Referenced by SketcherGui::ConstraintToAttachment().
int Sketcher::GeoElementId::GeoId |
Underlying GeoId (see GeoEnum for definition)
Referenced by SketcherGui::ConstraintToAttachment(), Sketcher::GeoListModel< T >::getPoint(), operator!=(), std::less< Sketcher::GeoElementId >::operator()(), and operator==().
|
staticconstexpr |
GeoElementId of the Horizontal Axis.
Referenced by SketcherGui::ConstraintToAttachment().
PointPos Sketcher::GeoElementId::Pos |
Indication of vertex or curve (see PointPos)
Referenced by Sketcher::GeoListModel< T >::getPoint(), isCurve(), operator!=(), std::less< Sketcher::GeoElementId >::operator()(), operator==(), and posIdAsInt().
|
staticconstexpr |
GeoElementId of the Root Point.
Referenced by SketcherGui::EditModeGeometryCoinConverter::convert().
|
staticconstexpr |
GeoElementId of the Vertical Axis.
Referenced by SketcherGui::ConstraintToAttachment().