LuciadCPillar 2024.0.04
luciad::Coordinate Struct Reference

A "POD" for a 3D coordinate. More...

#include <luciad/cartesian/Coordinate.h>

Public Member Functions

constexpr Coordinate ()
 Constructs a coordinate with default values for x, y, and z using 0. More...
 
constexpr Coordinate (double x, double y, double z=0.0)
 Constructs a coordinate with the provide values for x, y, and z. More...
 
size_t getHash () const
 Returns the hash for this coordinate. More...
 
constexpr bool operator!= (const Coordinate &other) const
 
constexpr Coordinate operator* (const Coordinate &other) const
 
constexpr Coordinate operator* (double factor) const
 
constexpr Coordinateoperator*= (const Coordinate &other)
 
constexpr Coordinateoperator*= (double factor)
 
constexpr Coordinate operator+ (const Coordinate &other) const
 
constexpr Coordinateoperator+= (const Coordinate &other)
 
constexpr Coordinate operator- (const Coordinate &other) const
 
constexpr Coordinateoperator-= (const Coordinate &other)
 
constexpr Coordinate operator/ (const Coordinate &other) const
 
constexpr Coordinate operator/ (double factor) const
 
constexpr Coordinateoperator/= (double factor)
 
constexpr bool operator== (const Coordinate &other) const
 
double & operator[] (size_t i)
 
const double & operator[] (size_t i) const
 

Public Attributes

double x
 The x value of the coordinate. More...
 
double y
 The y value of the coordinate. More...
 
double z
 The z value of the coordinate. More...
 

Detailed Description

A "POD" for a 3D coordinate.

Not a geometry, to be used as primitive in geometries.

Constructor & Destructor Documentation

◆ Coordinate() [1/2]

constexpr luciad::Coordinate::Coordinate ( )
inlineconstexpr

Constructs a coordinate with default values for x, y, and z using 0.

◆ Coordinate() [2/2]

constexpr luciad::Coordinate::Coordinate ( double  x,
double  y,
double  z = 0.0 
)
inlineconstexpr

Constructs a coordinate with the provide values for x, y, and z.

Parameters
xthe x value of the coordinate.
ythe y value of the coordinate.
zthe z value of the coordinate.

Member Function Documentation

◆ getHash()

size_t luciad::Coordinate::getHash ( ) const

Returns the hash for this coordinate.

Returns
the hash for this coordinate.

◆ operator!=()

constexpr bool luciad::Coordinate::operator!= ( const Coordinate other) const
inlineconstexpr

◆ operator*() [1/2]

constexpr Coordinate luciad::Coordinate::operator* ( const Coordinate other) const
inlineconstexpr

◆ operator*() [2/2]

constexpr Coordinate luciad::Coordinate::operator* ( double  factor) const
inlineconstexpr

◆ operator*=() [1/2]

constexpr Coordinate & luciad::Coordinate::operator*= ( const Coordinate other)
inlineconstexpr

◆ operator*=() [2/2]

constexpr Coordinate & luciad::Coordinate::operator*= ( double  factor)
inlineconstexpr

◆ operator+()

constexpr Coordinate luciad::Coordinate::operator+ ( const Coordinate other) const
inlineconstexpr

◆ operator+=()

constexpr Coordinate & luciad::Coordinate::operator+= ( const Coordinate other)
inlineconstexpr

◆ operator-()

constexpr Coordinate luciad::Coordinate::operator- ( const Coordinate other) const
inlineconstexpr

◆ operator-=()

constexpr Coordinate & luciad::Coordinate::operator-= ( const Coordinate other)
inlineconstexpr

◆ operator/() [1/2]

constexpr Coordinate luciad::Coordinate::operator/ ( const Coordinate other) const
inlineconstexpr

◆ operator/() [2/2]

constexpr Coordinate luciad::Coordinate::operator/ ( double  factor) const
inlineconstexpr

◆ operator/=()

constexpr Coordinate & luciad::Coordinate::operator/= ( double  factor)
inlineconstexpr

◆ operator==()

constexpr bool luciad::Coordinate::operator== ( const Coordinate other) const
inlineconstexpr

◆ operator[]() [1/2]

double & luciad::Coordinate::operator[] ( size_t  i)
inline

◆ operator[]() [2/2]

const double & luciad::Coordinate::operator[] ( size_t  i) const
inline

Member Data Documentation

◆ x

double luciad::Coordinate::x

The x value of the coordinate.

◆ y

double luciad::Coordinate::y

The y value of the coordinate.

◆ z

double luciad::Coordinate::z

The z value of the coordinate.