Proto
3.2
|
Defines discrete rotations in logically rectangular coordinate systems. More...
#include <Proto_CoordPermutation.H>
Public Member Functions | |
CoordPermutation () | |
Default / Identity constructor. More... | |
CoordPermutation (std::initializer_list< Array< int, 3 >> a_args) | |
Constructor. More... | |
CoordPermutation (std::initializer_list< Array< Point, 2 >> a_args) | |
CoordPermutation (std::vector< Array< int, 3 >> &a_args) | |
void | define (std::vector< Array< int, 3 >> &a_args) |
void | defineMatrix (Array< Array< int, DIM >, DIM > a_matrix) |
Point | operator() (Point a_pt) const |
Direct Matrix Construction. More... | |
CoordPermutation | inverse () const |
Compute and return the inverse Permutation. More... | |
Point | rotateCell (Point a_point, const Box &a_srcBox, const Box &a_dstBox) const |
Rotate Cell. More... | |
Point | rotatePoint (Point a_point, const Box &a_srcBox, const Box &a_dstBox) const |
Rotate Point. More... | |
template<typename T , unsigned int C = 1, unsigned int D = 1, unsigned int E = 1> | |
void | rotateBuffer (T *srcData, T *dstData, const Box &srcBox, const Box &dstBox) const |
Array< Array< int, DIM >, DIM > | matrix () const |
bool | operator== (const CoordPermutation &a_rhs) const |
bool | isIdentity () const |
void | print () const |
void | printMatrix () const |
Static Public Member Functions | |
static CoordPermutation | identity () |
Trivial Permutation. More... | |
static CoordPermutation | cw (int a_coord=2) |
Clockwise (-90* rotation) in the XY plane. More... | |
static CoordPermutation | ccw (int a_coord=2) |
Counter-Clockwise (+90* rotation) in the XY plane. More... | |
static CoordPermutation | reverse () |
Invert all coordinates. More... | |
static CoordPermutation | rotatePlane (int a_c0, int a_c1) |
Rotate the plane containing two coordinates such that c0 -> c1. More... | |
Private Member Functions | |
bool | isValid () const |
Private Attributes | |
Array< Array< int, DIM >, DIM > | m_matrix |
Defines discrete rotations in logically rectangular coordinate systems.
|
inline |
Default / Identity constructor.
|
inline |
Constructor.
Syntax: CoordPermutation p {{c0, c1, s}, {c0, c1, s}};
Which is meant to be read as "map coordinate c0 to coordinate c1 with
an optional reflection s". Any coordinates omitted from the constructor are understood to be mapped through a positive identity
Example: 2D rotation in 3D: CoordPermutation rot{{0,1,1}, {1,0,-1}};
coord 0 -> +coord 1 coord 1 -> -coord 0 coord 2 -> +coord 2
|
inline |
|
inline |
|
inlinestatic |
Trivial Permutation.
|
inlinestatic |
Clockwise (-90* rotation) in the XY plane.
|
inlinestatic |
Counter-Clockwise (+90* rotation) in the XY plane.
|
inlinestatic |
Invert all coordinates.
|
inlinestatic |
Rotate the plane containing two coordinates such that c0 -> c1.
Note that swapping the order of the inputs reverses the direction or rotation.
|
inline |
Direct Matrix Construction.
Permute the coordinates of a Point
|
inline |
Compute and return the inverse Permutation.
Referenced by Proto::MBBoundaryData< T, C, MEM >::define().
|
inline |
References isIdentity(), isValid(), m_matrix, operator==(), print(), and printMatrix().
|
inline |
Referenced by matrix().
|
inline |
Referenced by matrix().
|
inline |
Referenced by matrix().
|
inline |
Referenced by matrix().
|
inlineprivate |
Referenced by matrix().