QGIS API Documentation  3.18.1-Zürich (202f1bf7e5)
Public Types | Public Member Functions | Public Attributes | List of all members
QgsVertexId Class Reference

Utility class for identifying a unique vertex within a geometry. More...

#include <qgsabstractgeometry.h>

Public Types

enum  VertexType { SegmentVertex = 1 , CurveVertex }
 Type of vertex. More...
 

Public Member Functions

 QgsVertexId (int _part=-1, int _ring=-1, int _vertex=-1, VertexType _type=SegmentVertex) SIP_HOLDGIL
 Constructor for QgsVertexId. More...
 
bool isValid () const SIP_HOLDGIL
 Returns true if the vertex id is valid. More...
 
bool isValid (const QgsAbstractGeometry *geom) const SIP_HOLDGIL
 Returns true if this vertex ID is valid for the specified geom. More...
 
bool operator!= (QgsVertexId other) const SIP_HOLDGIL
 
bool operator== (QgsVertexId other) const SIP_HOLDGIL
 
bool partEqual (QgsVertexId o) const SIP_HOLDGIL
 Returns true if this vertex ID belongs to the same part as another vertex ID. More...
 
bool ringEqual (QgsVertexId o) const SIP_HOLDGIL
 Returns true if this vertex ID belongs to the same ring as another vertex ID (i.e. More...
 
bool vertexEqual (QgsVertexId o) const SIP_HOLDGIL
 Returns true if this vertex ID corresponds to the same vertex as another vertex ID (i.e. More...
 

Public Attributes

int part = -1
 Part number. More...
 
int ring = -1
 Ring number. More...
 
VertexType type = SegmentVertex
 Vertex type. More...
 
int vertex = -1
 Vertex number. More...
 

Detailed Description

Utility class for identifying a unique vertex within a geometry.

Since
QGIS 2.10

Definition at line 1076 of file qgsabstractgeometry.h.

Member Enumeration Documentation

◆ VertexType

Type of vertex.

Enumerator
SegmentVertex 

The actual start or end point of a segment.

CurveVertex 

An intermediate point on a segment defining the curvature of the segment.

Definition at line 1082 of file qgsabstractgeometry.h.

Constructor & Destructor Documentation

◆ QgsVertexId()

QgsVertexId::QgsVertexId ( int  _part = -1,
int  _ring = -1,
int  _vertex = -1,
VertexType  _type = SegmentVertex 
)
inlineexplicit

Constructor for QgsVertexId.

Definition at line 1091 of file qgsabstractgeometry.h.

Member Function Documentation

◆ isValid() [1/2]

bool QgsVertexId::isValid ( ) const
inline

Returns true if the vertex id is valid.

Definition at line 1101 of file qgsabstractgeometry.h.

◆ isValid() [2/2]

bool QgsVertexId::isValid ( const QgsAbstractGeometry geom) const
inline

Returns true if this vertex ID is valid for the specified geom.

Definition at line 1141 of file qgsabstractgeometry.h.

◆ operator!=()

bool QgsVertexId::operator!= ( QgsVertexId  other) const
inline

Definition at line 1107 of file qgsabstractgeometry.h.

◆ operator==()

bool QgsVertexId::operator== ( QgsVertexId  other) const
inline

Definition at line 1103 of file qgsabstractgeometry.h.

◆ partEqual()

bool QgsVertexId::partEqual ( QgsVertexId  o) const
inline

Returns true if this vertex ID belongs to the same part as another vertex ID.

Definition at line 1115 of file qgsabstractgeometry.h.

◆ ringEqual()

bool QgsVertexId::ringEqual ( QgsVertexId  o) const
inline

Returns true if this vertex ID belongs to the same ring as another vertex ID (i.e.

the part and ring number are equal).

Definition at line 1124 of file qgsabstractgeometry.h.

◆ vertexEqual()

bool QgsVertexId::vertexEqual ( QgsVertexId  o) const
inline

Returns true if this vertex ID corresponds to the same vertex as another vertex ID (i.e.

the part, ring number and vertex number are equal).

Definition at line 1133 of file qgsabstractgeometry.h.

Member Data Documentation

◆ part

int QgsVertexId::part = -1

Part number.

Definition at line 1149 of file qgsabstractgeometry.h.

◆ ring

int QgsVertexId::ring = -1

Ring number.

Definition at line 1152 of file qgsabstractgeometry.h.

◆ type

VertexType QgsVertexId::type = SegmentVertex

Vertex type.

Definition at line 1158 of file qgsabstractgeometry.h.

◆ vertex

int QgsVertexId::vertex = -1

Vertex number.

Definition at line 1155 of file qgsabstractgeometry.h.


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