AlignT.hh 1.01 KB
Newer Older
1 2 3

namespace align{

4 5 6 7
/** \brief Move Mesh into center of gravity
 *
 * @param _mesh Mesh to modify
 */
8
template< class MeshT >
9
void moveToCOG(MeshT& _mesh);
10

11 12 13 14
/** \brief Rotate a mesh such that its largest PCA axis is aligned to x and second largest aligned to y
 *
 * @param _mesh Mesh to modify
 */
15 16 17
template< class MeshT >
void rotate(MeshT& _mesh);

18 19 20 21
/** \brief Move mesh such that its bounding box center is in the origin
 *
 * @param _mesh Mesh to modify
 */
22 23 24
template< class MeshT >
void moveCenterOfBBToOrigin(MeshT& _mesh);

25 26 27 28
/** \brief Scale mesh such that it has length 1 on each separate axis
 *
 * @param _mesh Mesh to modify
 */
29 30 31
template< class MeshT >
void scaleToUnitCubeNonUniform(MeshT& _mesh);

32 33 34 35
/** \brief Scale mesh such that it has length 1 on the largest axis (keeps ratios of axis)
 *
 * @param _mesh Mesh to modify
 */
36 37 38 39 40 41 42 43 44 45 46 47
template< class MeshT >
void scaleToUnitCubeUniform(MeshT& _mesh);

} // namespace align


#if defined(INCLUDE_TEMPLATES) && !defined(ALIGNT_CC)
#define MALIGNT_TEMPLATES
#include "AlignT.cc"
#endif