Class astrea::astro::CartesianVector¶
template <class Value_T, class Frame_T>
ClassList > astrea > astro > CartesianVector
Class representing a 3D vector in Cartesian coordinates.More...
#include <CartesianVector.hpp>
Public Functions¶
| Type | Name |
|---|---|
| CartesianVector (const Value_T & x=Value_T(), const Value_T & y=Value_T(), const Value_T & z=Value_T()) Default constructor for CartesianVector . |
|
| CartesianVector (const CartesianVector< Value_T, Frame_U > & other) = delete |
|
| CartesianVector (CartesianVector< Value_T, Frame_U > && other) = delete |
|
| CartesianVector< Value_T, Frame_U > | force_frame_conversion () const Copy constructor for CartesianVector that implicitly converts the frame. |
| CartesianVector< Value_T, Frame_T > | operator= (const CartesianVector< Value_T, Frame_U > & other) = delete |
| CartesianVector< Value_T, Frame_T > | operator= (CartesianVector< Value_T, Frame_U > && other) = delete |
| bool | operator== (const CartesianVector< Value_U, Frame_T > & other) const Equality operator for CartesianVector . |
| Value_T & | operator[] (size_t index) Access operator for vector components. |
| const Value_T & | operator[] (size_t index) const Const access operator for vector components. |
| requires (!std::is_same< Frame_T, Frame_U >::value) Inequality operator for CartesianVector in a different frame. Always false. |
Detailed Description¶
This class encapsulates a vector with three components (x, y, z) and provides various operations such as addition, subtraction, scalar multiplication, and dot/cross products.
Template parameters:
TThe type of the vector components (e.g., Distance, Velocity).
Public Functions Documentation¶
function CartesianVector [1/3]¶
Default constructor for CartesianVector .
inline astrea::astro::CartesianVector::CartesianVector (
const Value_T & x=Value_T(),
const Value_T & y=Value_T(),
const Value_T & z=Value_T()
)
Initializes the vector components to zero.
Parameters:
xThe x component of the vector (default is 0).yThe y component of the vector (default is 0).zThe z component of the vector (default is 0).
function CartesianVector [2/3]¶
template<typename Frame_U>
astrea::astro::CartesianVector::CartesianVector (
const CartesianVector < Value_T, Frame_U > & other
) = delete
function CartesianVector [3/3]¶
template<typename Frame_U>
astrea::astro::CartesianVector::CartesianVector (
CartesianVector < Value_T, Frame_U > && other
) = delete
function force_frame_conversion¶
Copy constructor for CartesianVector that implicitly converts the frame.
template<typename Frame_U>
inline CartesianVector < Value_T, Frame_U > astrea::astro::CartesianVector::force_frame_conversion () const
Parameters:
otherThe other CartesianVector to copy from.
function operator=¶
template<typename Frame_U>
CartesianVector < Value_T, Frame_T > astrea::astro::CartesianVector::operator= (
const CartesianVector < Value_T, Frame_U > & other
) = delete
function operator=¶
template<typename Frame_U>
CartesianVector < Value_T, Frame_T > astrea::astro::CartesianVector::operator= (
CartesianVector < Value_T, Frame_U > && other
) = delete
function operator==¶
Equality operator for CartesianVector .
template<typename Value_U>
inline bool astrea::astro::CartesianVector::operator== (
const CartesianVector < Value_U, Frame_T > & other
) const
Parameters:
otherThe other CartesianVector to compare with.
Returns:
true If the two vectors are equal.
Returns:
false If the two vectors are not equal.
function operator[]¶
Access operator for vector components.
Parameters:
indexThe index of the component to access (0 for x, 1 for y, 2 for z).
Returns:
Value_T& Reference to the component at the specified index.
function operator[]¶
Const access operator for vector components.
Parameters:
indexThe index of the component to access (0 for x, 1 for y, 2 for z).
Returns:
const Value_T& Reference to the component at the specified index.
function requires¶
Inequality operator for CartesianVector in a different frame. Always false.
template<typename Frame_U>
astrea::astro::CartesianVector::requires (
!std::is_same< Frame_T, Frame_U >::value
)
Parameters:
otherThe other CartesianVector to compare with.
Returns:
true If the two vectors are not equal.
Returns:
false If the two vectors are equal. Array to hold the x, y, and z components of the vector.
The documentation for this class was generated from the following file astrea/astro/astro/frames/CartesianVector.hpp