Class point2d_t

Class Documentation

class point2d_t

Public Types

using shared_ptr = std::shared_ptr<point2d_t>

Typedef for shared pointer to point2d_t.

using unique_ptr = std::unique_ptr<point2d_t>

Typedef for unique pointer to point2d_t.

using weak_ptr = std::weak_ptr<point2d_t>

Typedef for weak pointer to point2d_t.

using vector = std::vector<point2d_t>

Typedef for vector of point2d_t.

using pair = pair_t<point2d_t, point2d_t>

Pair.

Public Functions

inline point2d_t()

Constructors.

inline point2d_t(const double u_, const double v_)

Constructor with parameters.

Parameters:
  • u_ – Parameter u_.

  • v_ – Parameter v_.

inline point2d_t(const point2d_t &other_)

Copy constructor

Parameters:

other_ – Parameter other_.

inline point2d_t(const array2D_t &pointArray_)

Constructor from array2D_t.

Parameters:

pointArray_ – Parameter pointArray_.

inline point2d_t(const Eigen::Vector2d &pointEigen_)

Constructor from Eigen.

Parameters:

pointEigen_ – Parameter pointEigen_.

inline auto operator->()

Pointer-like access to this point.

inline auto operator->() const

Pointer-like access to this point (const).

inline bool operator==(const point2d_t &other_) const

Defines the == operator for point2d_t.

Parameters:

other_ – Parameter other_. Compares two point2d_t objects for equality based on their coordinates.

Returns:

true if both points have the same coordinates, false otherwise.

inline void print(std::string prefix_) const

Print function

Parameters:

prefix_ – Parameter prefix_.

inline point2d_t get_point() const

Get the point type variable.

Returns:

Returned value.

inline point2d_t clone() const

Get the point type variable.

Returns:

Returned value.

inline array2D_t to_2d_array() const

Converts the point to a 2D array representation.

Returns:

Returned value.

inline Eigen::Vector2d to_eigen() const

Get the eigen coordinates object.

Returns:

Returned value.

inline operator array2D_t() const

Convert from point2d_t to array2D_t.

Returns:

Returned value.

inline operator Eigen::Vector2d() const

Convert from point2d_t to Eigen::Vector2d.

Returns:

Returned vector

inline double operator[](const int index_) const

Overloaded operator to access the coordinates of the point.

Parameters:

index_ – Parameter index_.

Throws:

std::out_of_range – if the index is not 0 or 1

Returns:

coordinate value

inline double at(const int index_) const

To access the coordinates of the point.

Parameters:

index_ – Parameter index_. 1st correspoints to u, 2nd to v.

Returns:

Returned value.

Private Members

double _u

U coordinate.

double _v

V coordinate.