Blender V4.3
math_basis_types.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
6
7#include <ostream>
8
9namespace blender::math {
10
11std::ostream &operator<<(std::ostream &stream, const Axis axis)
12{
13 switch (axis.axis_) {
14 default:
16 return stream << "Invalid Axis";
17 case Axis::Value::X:
18 return stream << 'X';
19 case Axis::Value::Y:
20 return stream << 'Y';
21 case Axis::Value::Z:
22 return stream << 'Z';
23 }
24}
25std::ostream &operator<<(std::ostream &stream, const AxisSigned axis)
26{
27 switch (axis.axis_) {
28 default:
30 return stream << "Invalid AxisSigned";
37 return stream << axis.axis() << (axis.sign() == -1 ? '-' : '+');
38 }
39}
40std::ostream &operator<<(std::ostream &stream, const CartesianBasis &rot)
41{
42 return stream << "CartesianBasis" << rot.axes;
43}
44
45} // namespace blender::math
#define BLI_assert_unreachable()
Definition BLI_assert.h:97
#define rot(x, k)
std::ostream & operator<<(std::ostream &stream, EulerOrder order)