MeshKernel
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
meshkernel::Sample Class Reference

A struct describing a sample with two coordinates and a value. More...

#include <Entities.hpp>

Inheritance diagram for meshkernel::Sample:
meshkernel::Point

Public Member Functions

 Sample ()=default
 Default constructor.
 
 Sample (double x, double y, double value)
 Constructor taking coordinates and values.
 
bool IsValid (const double missingValue=constants::missing::doubleValue) const
 Determines if the sample instance has valid coordinates.
 
- Public Member Functions inherited from meshkernel::Point
 Point ()
 Constructor initializing with missing values.
 
 Point (double x, double y)
 Constructor initializing with given coordinates. More...
 
void SetInvalid ()
 Set the point to be invalid. More...
 
Pointoperator+= (const Point &p)
 Inplace add point to point.
 
Pointoperator-= (const Point &p)
 Inplace subtract point from point.
 
Pointoperator+= (const Vector &vec)
 Inplace add vector to a point.
 
Pointoperator-= (const Vector &vec)
 Inplace subtract vector from a point.
 
Pointoperator/= (const Point &p)
 Inplace divide point by point. More...
 
Pointoperator*= (const Point &p)
 Inplace multiply point by point.
 
Pointoperator+= (const double p)
 Inplace add scalar to point.
 
Pointoperator-= (const double p)
 Inplace subtract scalar from point.
 
Pointoperator/= (const double p)
 Inplace divide point by scalar. More...
 
Pointoperator*= (const double p)
 Inplace multiply point by scalar.
 
Point operator* (int const &rhs) const
 Overloads multiplication with a integer.
 
void TransformSphericalToCartesian (double referenceLatitude)
 Transforms spherical coordinates to cartesian. More...
 
bool IsValid (const double missingValue=constants::missing::doubleValue) const
 Determines if one of the point coordinates equals to missingValue.
 

Static Public Member Functions

static auto ConvertToSamples (int numSamples, const double **samplesXCoordinate, const double **samplesYCoordinate, const double **samplesValue)
 Convert double arrays to std::vector<Sample> More...
 

Public Attributes

double value = constants::missing::doubleValue
 Value.
 
- Public Attributes inherited from meshkernel::Point
double x
 X-coordinate.
 
double y
 Y-coordinate.
 

Detailed Description

A struct describing a sample with two coordinates and a value.

Member Function Documentation

◆ ConvertToSamples()

static auto meshkernel::Sample::ConvertToSamples ( int  numSamples,
const double **  samplesXCoordinate,
const double **  samplesYCoordinate,
const double **  samplesValue 
)
inlinestatic

Convert double arrays to std::vector<Sample>

Parameters
[in]numSamplesNumber of samples
[in]samplesXCoordinateX-coordinates of the samples
[in]samplesYCoordinateY-coordinates of the samples
[in]samplesValueValues of the samples

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