| 81 | } |
| 82 | |
| 83 | void CoordinateSystem::setXDirection(const Vector3d& dir) |
| 84 | { |
| 85 | Vector3d yd = axis.getDirection() % dir; |
| 86 | if (yd.Sqr() < Base::Vector3d::epsilon()) { |
| 87 | throw Base::ValueError("Direction is parallel to Z-direction"); |
| 88 | } |
| 89 | ydir = yd; |
| 90 | ydir.Normalize(); |
| 91 | xdir = ydir % axis.getDirection(); |
| 92 | xdir.Normalize(); |
| 93 | } |
| 94 | |
| 95 | void CoordinateSystem::setYDirection(const Vector3d& dir) |
| 96 | { |
no test coverage detected