NLMech  0.1.0
util::transformation Namespace Reference

Provides geometrical methods such rotation of a vector. More...

Functions

std::vector< size_t > cyclicOrderACW (const size_t &i, const size_t &j, const size_t &k, const size_t &n)
 Returns the list of elements in anti-clockwise order with indices i, j, and k as the first three elements. More...
 
std::vector< size_t > cyclicOrderACW (const size_t &i, const size_t &j, const size_t &n)
 Returns the list of elements in anti-clockwise order starting from given index i and then index j. More...
 
std::vector< size_t > cyclicOrderACW (const size_t &i, const size_t &n)
 Returns the list of elements in anti-clockwise order starting from given index i. More...
 
std::vector< double > rotateACW2D (const std::vector< double > &x, const double &theta)
 Rotates a vector in xy-plane in anti-clockwise direction. More...
 
util::Point3 rotateACW2D (const util::Point3 &x, const double &theta)
 Rotates a vector in xy-plane in anti-clockwise direction. More...
 
std::vector< double > rotateCW2D (const std::vector< double > &x, const double &theta)
 Rotates a vector in xy-plane in clockwise direction. More...
 
util::Point3 rotateCW2D (const util::Point3 &x, const double &theta)
 Rotates a vector in xy-plane in clockwise direction. More...
 

Detailed Description

Provides geometrical methods such rotation of a vector.

Function Documentation

◆ cyclicOrderACW() [1/3]

std::vector< size_t > util::transformation::cyclicOrderACW ( const size_t &  i,
const size_t &  j,
const size_t &  k,
const size_t &  n 
)

Returns the list of elements in anti-clockwise order with indices i, j, and k as the first three elements.

Parameters
iIndex i which will be the first element of returned list
jIndex j which will be the second element of returned list
kIndex k which will be the third element of returned list
nNumber of elements
Returns
list List of indices starting from i, j and k in ACW order

◆ cyclicOrderACW() [2/3]

std::vector< size_t > util::transformation::cyclicOrderACW ( const size_t &  i,
const size_t &  j,
const size_t &  n 
)

Returns the list of elements in anti-clockwise order starting from given index i and then index j.

Parameters
iIndex i which will be the first element of returned list
jIndex j which will be the second element of returned list
nNumber of elements
Returns
list List of indices starting from i and j in ACW order

◆ cyclicOrderACW() [3/3]

std::vector< size_t > util::transformation::cyclicOrderACW ( const size_t &  i,
const size_t &  n 
)

Returns the list of elements in anti-clockwise order starting from given index i.

Parameters
iIndex i which will be the first element of returned list
nNumber of elements
Returns
list List of indices starting from i in ACW order

◆ rotateACW2D() [1/2]

std::vector< double > util::transformation::rotateACW2D ( const std::vector< double > &  x,
const double &  theta 
)

Rotates a vector in xy-plane in anti-clockwise direction.

Parameters
xPoint
thetaAngle
Returns
Point after rotation
Here is the call graph for this function:

◆ rotateACW2D() [2/2]

util::Point3 util::transformation::rotateACW2D ( const util::Point3 x,
const double &  theta 
)

Rotates a vector in xy-plane in anti-clockwise direction.

Parameters
xPoint
thetaAngle
Returns
Point after rotation
Here is the call graph for this function:

◆ rotateCW2D() [1/2]

std::vector< double > util::transformation::rotateCW2D ( const std::vector< double > &  x,
const double &  theta 
)

Rotates a vector in xy-plane in clockwise direction.

Parameters
xPoint
thetaAngle
Returns
Point after rotation

Referenced by util::geometry::isPointInsideAngledRectangle(), inp::EdgeCrack::ptOutside(), and rotateACW2D().

Here is the caller graph for this function:

◆ rotateCW2D() [2/2]

util::Point3 util::transformation::rotateCW2D ( const util::Point3 x,
const double &  theta 
)

Rotates a vector in xy-plane in clockwise direction.

Parameters
xPoint
thetaAngle
Returns
Point after rotation