| Line |
Branch |
Exec |
Source |
| 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> |
| 19 |
|
|
inline char axisLabel(); |
| 20 |
|
|
|
| 21 |
|
|
template<> |
| 22 |
|
58697 |
inline char axisLabel<0>() |
| 23 |
|
|
{ |
| 24 |
|
58697 |
return 'X'; |
| 25 |
|
|
} |
| 26 |
|
|
template<> |
| 27 |
|
58696 |
inline char axisLabel<1>() |
| 28 |
|
|
{ |
| 29 |
|
58696 |
return 'Y'; |
| 30 |
|
|
} |
| 31 |
|
|
template<> |
| 32 |
|
58702 |
inline char axisLabel<2>() |
| 33 |
|
|
{ |
| 34 |
|
58702 |
return 'Z'; |
| 35 |
|
|
} |
| 36 |
|
|
} // namespace pinocchio |
| 37 |
|
|
|
| 38 |
|
|
#endif // __pinocchio_axis_label_hpp__ |
| 39 |
|
|
|