Blender V5.0
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
8
10
11#include <ostream>
12
13namespace blender::math {
14
15std::ostream &operator<<(std::ostream &stream, const Axis axis)
16{
17 switch (axis.axis_) {
18 default:
20 return stream << "Invalid Axis";
21 case Axis::Value::X:
22 return stream << 'X';
23 case Axis::Value::Y:
24 return stream << 'Y';
25 case Axis::Value::Z:
26 return stream << 'Z';
27 }
28}
29std::ostream &operator<<(std::ostream &stream, const AxisSigned axis)
30{
31 switch (axis.axis_) {
32 default:
34 return stream << "Invalid AxisSigned";
41 return stream << axis.axis() << (axis.sign() == -1 ? '-' : '+');
42 }
43}
44std::ostream &operator<<(std::ostream &stream, const CartesianBasis &rot)
45{
46 return stream << "CartesianBasis" << rot.axes;
47}
48
49} // namespace blender::math
#define BLI_assert_unreachable()
Definition BLI_assert.h:93
#define rot(x, k)
std::ostream & operator<<(std::ostream &stream, EulerOrder order)