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

A struct describing a point in a two-dimensional space. More...

#include <Point.hpp>

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

Public Member Functions

 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.
 

Public Attributes

double x
 X-coordinate.
 
double y
 Y-coordinate.
 

Detailed Description

A struct describing a point in a two-dimensional space.

Constructor & Destructor Documentation

◆ Point()

meshkernel::Point::Point ( double  x,
double  y 
)
inline

Constructor initializing with given coordinates.

Parameters
[in]xcoordinate
[in]ycoordinate

Member Function Documentation

◆ operator/=() [1/2]

meshkernel::Point & meshkernel::Point::operator/= ( const double  p)
inline

Inplace divide point by scalar.

Note
No check is made that the divisor is 0

◆ operator/=() [2/2]

meshkernel::Point & meshkernel::Point::operator/= ( const Point p)
inline

Inplace divide point by point.

Note
No check is made that any component of the divisor is 0

◆ SetInvalid()

void meshkernel::Point::SetInvalid ( )
inline

Set the point to be invalid.

Both x and y values are set to the null, missing value

◆ TransformSphericalToCartesian()

void meshkernel::Point::TransformSphericalToCartesian ( double  referenceLatitude)
inline

Transforms spherical coordinates to cartesian.

< Factor used in the transformation from spherical to Cartesian coordinates


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