A class to convert cartesian coordinates to barycentric coordinates on a triangle. More...
Public Types | |
using | BarycentricCoord = ddc::Coordinate< Corner1Tag, Corner2Tag, Corner3Tag > |
The type of a coordinate in the barycentric coordinate system. | |
using | CartesianCoord = ddc::Coordinate< X, Y > |
The type of a coordinate in the cartesian coordinate system. | |
Public Member Functions | |
CartesianToBarycentricCoordinates (CartesianCoord const &corner1, CartesianCoord const &corner2, CartesianCoord const &corner3) | |
Construct the operator which converts between the coordinate systems. More... | |
CartesianToBarycentricCoordinates (CartesianToBarycentricCoordinates const &other)=default | |
A copy operator for the mapping operator. More... | |
CartesianToBarycentricCoordinates (CartesianToBarycentricCoordinates &&x)=default | |
A r-value copy operator for the mapping operator. More... | |
~CartesianToBarycentricCoordinates ()=default | |
The destructor of the mapping operator. | |
CartesianToBarycentricCoordinates & | operator= (CartesianToBarycentricCoordinates const &x)=default |
A copy operator for the mapping operator. More... | |
CartesianToBarycentricCoordinates & | operator= (CartesianToBarycentricCoordinates &&x)=default |
A r-value copy operator for the mapping operator. More... | |
KOKKOS_FUNCTION BarycentricCoord | operator() (CartesianCoord const &pos) const final |
The operator to get the equivalent barycentric coordinate of the cartesian coordinate. More... | |
KOKKOS_FUNCTION CartesianCoord | operator() (BarycentricCoord const &pos) const final |
The operator to get the equivalent cartesian coordinate of the barycentric coordinate. More... | |
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. |
|
inlinefinalvirtual |
The operator to get the equivalent barycentric coordinate of the cartesian coordinate.
[in] | pos | The known cartesian coordinate. |
Implements CoordinateConverter< ddc::Coordinate< X, Y >, ddc::Coordinate< Corner1Tag, Corner2Tag, Corner3Tag > >.
|
inlinefinalvirtual |
The operator to get the equivalent cartesian coordinate of the barycentric coordinate.
[in] | pos | The known barycentric coordinate. |
Implements CoordinateConverter< ddc::Coordinate< Corner1Tag, Corner2Tag, Corner3Tag >, ddc::Coordinate< X, Y > >.