Rotation routine using the Eigen library.
More...
#include <rotate.h>
|
| | QuaternionRotate (double angle, Point axis) |
| | Set angle and rotation axis. More...
|
| |
| void | set (double angle, Point axis) |
| | Set angle and rotation axis. More...
|
| |
| auto | operator() (const Eigen::Matrix3d &matrix) const |
| | Rotate matrix/tensor. More...
|
| |
|
const Eigen::Quaterniond & | getQuaternion () const |
| | Get current quaternion.
|
| |
|
const Eigen::Matrix3d & | getRotationMatrix () const |
| | Get current rotation matrix.
|
| |
| Point | operator() (Point vector, std::function< void(Point &)> boundary=[](Point &) {}, const Point &shift={0, 0, 0}) const |
| | Rotate point w. optional PBC boundaries. More...
|
| |
|
|
double | angle = 0.0 |
| | Current rotation angle.
|
| |
Rotation routine using the Eigen library.
- Todo:
- Get rotate tensors using quaternion
This can rotate vectors and tensors using quaternion and rotation matrix (for matrix rotation).
◆ QuaternionRotate()
| Faunus::QuaternionRotate::QuaternionRotate |
( |
double |
angle, |
|
|
Point |
axis |
|
) |
| |
Set angle and rotation axis.
- Parameters
-
| angle | rotation angle (radians) |
| axis | rotation axis |
◆ operator()() [1/2]
| auto Faunus::QuaternionRotate::operator() |
( |
const Eigen::Matrix3d & |
matrix | ) |
const |
Rotate matrix/tensor.
- Parameters
-
| matrix | Matrix or tensor to rotate |
- Returns
- Rotated matrix or tensor
◆ operator()() [2/2]
| QuaternionRotate::Point Faunus::QuaternionRotate::operator() |
( |
Point |
r, |
|
|
std::function< void(Point &)> |
boundary = [](Point&) {}, |
|
|
const Point & |
shift = {0, 0, 0} |
|
) |
| const |
Rotate point w. optional PBC boundaries.
- Parameters
-
| vector | Point to rotate |
| boundary | Boundary function to handle PBC |
| shift | Shift used to aid in boundary removal |
- Returns
- Rotated vector
◆ set()
| void Faunus::QuaternionRotate::set |
( |
double |
angle, |
|
|
Point |
axis |
|
) |
| |
Set angle and rotation axis.
- Parameters
-
| angle | rotation angle (radians) |
| axis | rotation axis |
The documentation for this class was generated from the following files: