|
World Builder
1.1.0-pre
A geodynamic initial conditions generator
|
#include <interface.h>
Public Member Functions | |
| Point (CoordinateSystem coordinate_system_) | |
| Point (const std::array< double, dim > &location, CoordinateSystem coordinate_system_) | |
| Point (const Point< dim > &location, CoordinateSystem coordinate_system_) | |
| Point (const Point< dim > &location) | |
| Point (const double x, const double y, CoordinateSystem coordinate_system) | |
| Point (const double x, const double y, const double z, CoordinateSystem coordinate_system) | |
| ~Point ()=default | |
| Point< dim > & | operator= (const Point< dim > &point_right) |
| double | operator* (const Point< dim > &point_right) const |
| Point< dim > | operator* (const double scalar) const |
| Point< dim > | operator/ (const double scalar) const |
| Point< dim > | operator+ (const Point< dim > &point_right) const |
| Point< dim > | operator- (const Point< dim > &point_right) const |
| Point< dim > & | operator*= (const double scalar) |
| Point< dim > & | operator/= (const double scalar) |
| Point< dim > & | operator+= (const Point< dim > &point_right) |
| bool | operator== (const Point< dim > &point_) const |
| Point< dim > & | operator-= (const Point< dim > &point_right) |
| const double & | operator[] (const size_t index) const |
| double & | operator[] (const size_t index) |
| double | distance (const Point< 2 > &two) const |
| double | cheap_relative_distance_spherical (const Point< 2 > &two) const |
| double | cheap_relative_distance_cartesian (const Point< 2 > &two) const |
| const std::array< double, dim > & | get_array () const |
| CoordinateSystem | get_coordinate_system () const |
| double | norm () const |
| double | norm_square () const |
| template<> | |
| Point (const double x, const double y, const CoordinateSystem coordinate_system_) | |
| template<> | |
| Point (const double, const double, CoordinateSystem coordinate_system_) | |
| template<> | |
| Point (const double, const double, const double, CoordinateSystem coordinate_system_) | |
| template<> | |
| Point (const double x, const double y, const double z, CoordinateSystem coordinate_system_) | |
| template<> | |
| double | norm_square () const |
| template<> | |
| double | norm_square () const |
Private Attributes | |
| std::array< double, dim > | point |
| CoordinateSystem | coordinate_system |
Friends | |
| std::ostream & | operator<< (std::ostream &output, const Point< dim > &stream_point) |
A class which stores 2d and 3d arrays of doubles (depending on the dimension), and the coordinate system which the coordinates can be used for. It also implements several operations such as the computation of the l2 norm and the dot product.
Definition at line 33 of file interface.h.
|
inline |
|
inline |
|
inline |
|
inline |
| WorldBuilder::Point< dim >::Point | ( | const double | x, |
| const double | y, | ||
| CoordinateSystem | coordinate_system | ||
| ) |
Constructor. Constructs a 2d Point from two doubles and a coordinate system.
| WorldBuilder::Point< dim >::Point | ( | const double | x, |
| const double | y, | ||
| const double | z, | ||
| CoordinateSystem | coordinate_system | ||
| ) |
Constructor. Constructs a 3d Point from three doubles and a coordinate system.
|
inlinedefault |
Destructor
| WorldBuilder::Point< 2 >::Point | ( | const double | x, |
| const double | y, | ||
| const CoordinateSystem | coordinate_system_ | ||
| ) |
| WorldBuilder::Point< 3 >::Point | ( | const double | , |
| const double | , | ||
| CoordinateSystem | coordinate_system_ | ||
| ) |
| WorldBuilder::Point< 2 >::Point | ( | const double | , |
| const double | , | ||
| const double | , | ||
| CoordinateSystem | coordinate_system_ | ||
| ) |
| WorldBuilder::Point< 3 >::Point | ( | const double | x, |
| const double | y, | ||
| const double | z, | ||
| CoordinateSystem | coordinate_system_ | ||
| ) |
|
inline |
Computes the cheapest relative distance between this and a given point in cartesian coordinates. The return value itself is only guartenteed to have the property that a larger value is further away. In the current implementation that means for the cartasian case the squared value is returned and for the spherical value the result of the havearsine function without asin and sqrt is returned.
|
inline |
Computes the cheapest relative distance between this and a given point in spherical coordinates. The return value itself is only guartenteed to have the property that a larger value is further away. In the current implementation that means for the cartasian case the squared value is returned and for the spherical value the result of the havearsine function without asin and sqrt is returned.
| double WorldBuilder::Point< dim >::distance | ( | const Point< 2 > & | two | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
|
private |
|
private |