4#include "MRPch/MRFmt.h"
7struct fmt::formatter<
MR::Vector2<T>> : fmt::formatter<T>
9 template <
typename Context>
12 using Base = fmt::formatter<T>;
14 out = Base::format( v.
x, ctx );
17 out = Base::format( v.
y, ctx );
23struct fmt::formatter<
MR::Vector3<T>> : fmt::formatter<T>
25 template <
typename Context>
28 using Base = fmt::formatter<T>;
30 out = Base::format( v.
x, ctx );
33 out = Base::format( v.
y, ctx );
36 out = Base::format( v.
z, ctx );
42struct fmt::formatter<
MR::Vector4<T>> : fmt::formatter<T>
44 template <
typename Context>
47 using Base = fmt::formatter<T>;
49 out = Base::format( v.
x, ctx );
52 out = Base::format( v.
y, ctx );
55 out = Base::format( v.
z, ctx );
58 out = Base::format( v.
w, ctx );
64struct fmt::formatter<
MR::Matrix3<T>> : fmt::formatter<MR::Vector3<T>>
66 template <
typename Context>
71 out = v.format( mat.
x, ctx );
76 out = v.format( mat.
y, ctx );
81 out = v.format( mat.
z, ctx );
86 template <
typename Context>
89 return formatWith( mat, ctx, *
this );
94struct fmt::formatter<
MR::Matrix4<T>> : fmt::formatter<MR::Vector4<T>>
96 template <
typename Context>
99 using Vec = fmt::formatter<MR::Vector4<T>>;
100 auto out = ctx.out();
102 out = Vec::format( mat.
x, ctx );
107 out = Vec::format( mat.
y, ctx );
112 out = Vec::format( mat.
z, ctx );
117 out = Vec::format( mat.
w, ctx );
124struct fmt::formatter<
MR::AffineXf3<T>> : fmt::formatter<MR::Vector3<T>>
126 template <
typename Context>
127 constexpr auto format(
const MR::AffineXf3<T>& xf, Context& ctx )
const
129 using Mat = fmt::formatter<MR::Matrix3<T>>;
130 using Vec = fmt::formatter<MR::Vector3<T>>;
131 auto out = ctx.out();
133 out = Mat::formatWith( xf.A, ctx, *
this );
138 out = Vec::format( xf.b, ctx );
145struct fmt::formatter<
MR::Box<V>> : fmt::formatter<V>
147 template <
typename Context>
150 using Vec = fmt::formatter<V>;
151 auto out = ctx.out();
153 out = Vec::format( box.
min, ctx );
158 out = Vec::format( box.
max, ctx );
165struct fmt::formatter<
MR::BitSet> : fmt::formatter<std::string>
167 template <
typename Context>
170 using Base = fmt::formatter<std::string>;
171 return Base::format( toString( bs ), ctx );
#define MRMESH_API
Definition MRMeshFwd.h:80
Definition MRMesh/MRBitSet.h:24
Definition MRCameraOrientationPlugin.h:8
Box given by its min- and max- corners.
Definition MRMesh/MRBox.h:27
V max
Definition MRMesh/MRBox.h:35
V min
Definition MRMesh/MRBox.h:35
Definition MRMesh/MRMatrix3.h:21
Vector3< T > x
rows, identity matrix by default
Definition MRMesh/MRMatrix3.h:26
Vector3< T > y
Definition MRMesh/MRMatrix3.h:27
Vector3< T > z
Definition MRMesh/MRMatrix3.h:28
Definition MRMatrix4.h:22
Vector4< T > z
Definition MRMatrix4.h:29
Vector4< T > y
Definition MRMatrix4.h:28
Vector4< T > w
Definition MRMatrix4.h:30
Vector4< T > x
rows, identity matrix by default
Definition MRMatrix4.h:27
Definition MRVector2.h:29
T x
Definition MRVector2.h:35
T y
Definition MRVector2.h:35
Definition MRMesh/MRVector3.h:30
T x
Definition MRMesh/MRVector3.h:36
T y
Definition MRMesh/MRVector3.h:36
T z
Definition MRMesh/MRVector3.h:36
Definition MRVector4.h:23
T y
Definition MRVector4.h:29
T z
Definition MRVector4.h:29
T x
Definition MRVector4.h:29
T w
Definition MRVector4.h:29