LuciadCPillar 2026.0.04
Loading...
Searching...
No Matches
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.
constexpr Coordinate (double x, double y, double z=0.0)
 Constructs a coordinate with the provide values for x, y, and z.
size_t getHash () const
 Returns the hash for this coordinate.
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.
double y
 The y value of the coordinate.
double z
 The z value of the coordinate.

Detailed Description

A "POD" for a 3D coordinate.

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

Constructor & Destructor Documentation

◆ Coordinate() [1/2]

luciad::Coordinate::Coordinate ( )
inlineconstexpr

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

◆ Coordinate() [2/2]

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!=()

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

◆ operator*() [1/2]

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

◆ operator*() [2/2]

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

◆ operator*=() [1/2]

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

◆ operator*=() [2/2]

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

◆ operator+()

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

◆ operator+=()

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

◆ operator-()

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

◆ operator-=()

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

◆ operator/() [1/2]

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

◆ operator/() [2/2]

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

◆ operator/=()

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

◆ operator==()

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.