1 |
|
|
// |
2 |
|
|
// Copyright (c) 2018 CNRS |
3 |
|
|
// |
4 |
|
|
|
5 |
|
|
#ifndef __pinocchio_axis_label_hpp__ |
6 |
|
|
#define __pinocchio_axis_label_hpp__ |
7 |
|
|
|
8 |
|
|
namespace pinocchio |
9 |
|
|
{ |
10 |
|
|
|
11 |
|
|
/// |
12 |
|
|
/// \brief Generate the label (X, Y or Z) of the axis relative to its index. |
13 |
|
|
/// |
14 |
|
|
/// \tparam axis Index of the axis (either 0 for X, 1 for Y and Z for 2). |
15 |
|
|
/// |
16 |
|
|
/// \returns a char containing the label of the axis. |
17 |
|
|
/// |
18 |
|
|
template<int axis> inline char axisLabel(); |
19 |
|
|
|
20 |
|
54515 |
template<> inline char axisLabel<0>() { return 'X'; } |
21 |
|
54516 |
template<> inline char axisLabel<1>() { return 'Y'; } |
22 |
|
54511 |
template<> inline char axisLabel<2>() { return 'Z'; } |
23 |
|
|
} |
24 |
|
|
|
25 |
|
|
#endif // __pinocchio_axis_label_hpp__ |