Sketcher::GeoElementId Class Reference

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...

Detailed Description

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.

Constructor & Destructor Documentation

◆ GeoElementId()

constexpr Sketcher::GeoElementId::GeoElementId ( int  geoId = GeoEnum::GeoUndef,
PointPos  pos = PointPos::none 

default constructor initialises object to an undefined (invalid) element.

Member Function Documentation

◆ isCurve()

bool Sketcher::GeoElementId::isCurve ( ) const

References Sketcher::none, and Pos.

◆ operator!=()

bool GeoElementId::operator!= ( const GeoElementId obj) const

inequality operator

References GeoId, and Pos.

◆ operator==()

bool GeoElementId::operator== ( const GeoElementId obj) const

equality operator

References GeoId, and Pos.

◆ posIdAsInt()

int Sketcher::GeoElementId::posIdAsInt ( ) const

References Pos.

Referenced by SketcherGui::ConstraintToAttachment().

Member Data Documentation

◆ GeoId

int Sketcher::GeoElementId::GeoId

◆ HAxis

constexpr const GeoElementId Sketcher::GeoElementId::HAxis = GeoElementId(GeoEnum::HAxis, PointPos::none)

GeoElementId of the Horizontal Axis.

Referenced by SketcherGui::ConstraintToAttachment().

◆ Pos

PointPos Sketcher::GeoElementId::Pos

◆ RtPnt

constexpr const GeoElementId Sketcher::GeoElementId::RtPnt = GeoElementId(GeoEnum::RtPnt, PointPos::start)

◆ VAxis

constexpr const GeoElementId Sketcher::GeoElementId::VAxis = GeoElementId(GeoEnum::VAxis, PointPos::none)

GeoElementId of the Vertical Axis.

Referenced by SketcherGui::ConstraintToAttachment().

The documentation for this class was generated from the following files: