ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::axis_rotation< algebra_t > Struct Template Reference

Helper struct to rotate a vector around a given axis and angle counterclockwisely. More...

#include <detray/utils/axis_rotation.hpp>

Public Types

using algebra_type = algebra_t
 Algebra backend used for the rotation.
template<std::size_t ROWS, std::size_t COLS>
using matrix_type = dmatrix<algebra_t, ROWS, COLS>
 Matrix type used to represent the rotation.
using scalar_type = dscalar<algebra_t>
 Scalar type used for the rotation angle and matrix entries.
using vector3_type = dvector3D<algebra_t>
 Three-dimensional vector type rotated by this helper.

Public Member Functions

 axis_rotation (const vector3_type &axis, const scalar_type theta)
 Constructor for axis rotation.
template<typename vector3_t>
requires (concepts::vector3D<vector3_t> || concepts::column_matrix3D<vector3_t>)
vector3_t operator() (const vector3_t &v) const

Detailed Description

template<concepts::algebra algebra_t>
struct detray::axis_rotation< algebra_t >

Helper struct to rotate a vector around a given axis and angle counterclockwisely.

Constructor & Destructor Documentation

◆ axis_rotation()

template<concepts::algebra algebra_t>
detray::axis_rotation< algebra_t >::axis_rotation ( const vector3_type & axis,
const scalar_type theta )

Constructor for axis rotation.

Parameters
axisrotation axis
thetarotation angle

Member Function Documentation

◆ operator()()

template<concepts::algebra algebra_t>
template<typename vector3_t>
requires (concepts::vector3D<vector3_t> || concepts::column_matrix3D<vector3_t>)
vector3_t detray::axis_rotation< algebra_t >::operator() ( const vector3_t & v) const
Parameters
vvector to be rotated
Returns
Get the counterclockwisely-rotated vector