53 if ( std::isnan( mY ) )
57 else if ( std::isnan( mX ) )
59 return std::numeric_limits<double>::quiet_NaN();
63 return std::sqrt( ( mX ) * ( mX ) + ( mY ) * ( mY ) );
94 bool equal = std::isnan( mX ) == std::isnan( other.
x() );
95 equal &= std::isnan( mY ) == std::isnan( other.
y() );
99 if ( std::isnan( mY ) )
116 const QMap<QString, QString> &extraOptions )
117 : mIsScalar( isScalar )
118 , mIsValid( isValid )
119 , mIsOnVertices( isOnVertices )
120 , mExtraOptions( extraOptions )
126 return mExtraOptions;
147 return mIsOnVertices;
bool operator==(const QgsMeshDatasetValue &other) const
A rectangle specified with double values.
void setMinimal()
Set a rectangle so that min corner is at max and max corner is at min.
void set(double scalar)
Sets scalar value.
QgsMeshDatasetValue()=default
Default Ctor, initialize to NaN.
void setXMaximum(double x)
Set the maximum x value.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
virtual int vertexCount() const =0
Returns number of vertices in the native mesh.
Abstract base class for spatial data provider implementations.
void setY(double y)
Sets Y value.
QgsMeshDataProvider(const QString &uri, const QgsDataProvider::ProviderOptions &options)
Ctor.
QgsRectangle extent() const override
Returns the extent of the layer.
double y() const
Returns y value.
void setYMinimum(double y)
Set the minimum y value.
double scalar() const
Returns magnitude of vector for vector data or scalar value for scalar data.
Point geometry type, with support for z-dimension and m-values.
double yMinimum() const
Returns the y minimum value (bottom side of rectangle).
double xMaximum() const
Returns the x maximum value (right side of rectangle).
virtual QgsMeshVertex vertex(int index) const =0
Returns the mesh vertex at index.
Setting options for creating vector data providers.
void setYMaximum(double y)
Set the maximum y value.
double xMinimum() const
Returns the x minimum value (left side of rectangle).
double yMaximum() const
Returns the y maximum value (top side of rectangle).
QgsMeshDatasetValue represents single mesh dataset value.
void setX(double x)
Sets X value.
double x() const
Returns x value.
void setXMinimum(double x)
Set the minimum x value.