A class to convert cartesian coordinates to barycentric coordinates on a triangle. More...
Public Types | |
using | CoordResult = ddc::Coordinate< Corner1Tag, Corner2Tag, Corner3Tag > |
The type of a coordinate in the barycentric coordinate system. | |
using | CoordArg = ddc::Coordinate< X, Y > |
The type of a coordinate in the cartesian coordinate system. | |
Public Member Functions | |
CartesianToBarycentric (CartesianCoord const &corner1, CartesianCoord const &corner2, CartesianCoord const &corner3) | |
Construct the operator which converts between the coordinate systems. | |
CartesianToBarycentric (CartesianToBarycentric const &other)=default | |
A copy operator for the mapping operator. | |
CartesianToBarycentric (CartesianToBarycentric &&x)=default | |
A r-value copy operator for the mapping operator. | |
~CartesianToBarycentric ()=default | |
The destructor of the mapping operator. | |
CartesianToBarycentric & | operator= (CartesianToBarycentric const &x)=default |
A copy operator for the mapping operator. | |
CartesianToBarycentric & | operator= (CartesianToBarycentric &&x)=default |
A r-value copy operator for the mapping operator. | |
KOKKOS_FUNCTION CoordResult | operator() (CoordArg const &pos) const |
The operator to get the equivalent barycentric coordinate of the cartesian coordinate. | |
A class to convert cartesian coordinates to barycentric coordinates on a triangle.
Tags are used to identify the corners of the triangle. This ensures that there are different types for coordinate systems related to different triangles.
X | The tag of the x dimension of the cartesian coordinates. |
Y | The tag of the y dimension of the cartesian coordinates. |
Corner1Tag | A tag identifying the first corner of the triangle. |
Corner2Tag | A tag identifying the second corner of the triangle. |
Corner3Tag | A tag identifying the third corner of the triangle. |
|
inline |
Construct the operator which converts between the coordinate systems.
[in] | corner1 | The coordinates of the first corner of the triangle. |
[in] | corner2 | The coordinates of the second corner of the triangle. |
[in] | corner3 | The coordinates of the third corner of the triangle. |
|
default |
A copy operator for the mapping operator.
other | The object to be copied. |
|
default |
A r-value copy operator for the mapping operator.
x | The object to be consumed. |
|
default |
A copy operator for the mapping operator.
x | The object to be copied. |
|
default |
A r-value copy operator for the mapping operator.
x | The object to be consumed. |
|
inline |
The operator to get the equivalent barycentric coordinate of the cartesian coordinate.
[in] | pos | The known cartesian coordinate. |