ufe  3.2
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
debugTypesOstream.h
Go to the documentation of this file.
1 #line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.9-windows/ufe/include/debugTypesOstream.h"
2 // ===========================================================================
3 // Copyright 2021 Autodesk, Inc. All rights reserved.
4 //
5 // Use of this software is subject to the terms of the Autodesk license
6 // agreement provided at the time of installation or download, or which
7 // otherwise accompanies this software in either electronic or hard copy form.
8 // ===========================================================================
9 
10 #ifndef _debugTypesOstream
11 #define _debugTypesOstream
12 
13 #include "types.h"
14 
15 #include <ostream>
16 
17 UFE_NS_DEF {
18 
19  // Partial list of possible output stream operators for types objects. They can be added as required.
20 
21  template<class T>
22  std::ostream& operator << (std::ostream& os, const TypedVector3<T>& v)
23  {
24  os << "[" << v.x() << "," << v.y() << "," << v.z() << "]" ;
25  return os;
26  }
27 
28  std::ostream& operator << (std::ostream& os, const Matrix4d& m)
29  {
30  os << "[" << std::endl ;
31  os << m.matrix[0][0] << "," << m.matrix[0][1] << "," << m.matrix[0][2] << "," << m.matrix[0][3] << std::endl;
32  os << m.matrix[1][0] << "," << m.matrix[1][1] << "," << m.matrix[1][2] << "," << m.matrix[1][3] << std::endl;
33  os << m.matrix[2][0] << "," << m.matrix[2][1] << "," << m.matrix[2][2] << "," << m.matrix[2][3] << std::endl;
34  os << m.matrix[3][0] << "," << m.matrix[3][1] << "," << m.matrix[3][2] << "," << m.matrix[3][3] << std::endl;
35  os << "]" ;
36  return os;
37  }
38 
39  std::ostream& operator << (std::ostream& os, const BBox3d& bbox)
40  {
41  os << "min("
42  << bbox.min.x() << " "
43  << bbox.min.y() << " "
44  << bbox.min.z() << ")"
45  << "max("
46  << bbox.max.x() << " "
47  << bbox.max.y() << " "
48  << bbox.max.z() << ")\n";
49  return os;
50  }
51 }
52 #endif /* _debugTypesOstream */
Vector3d min
Definition: types.h:99
Vector3d max
Definition: types.h:100
#define UFE_NS_DEF
Definition: ufe.h:35
std::array< std::array< double, 4 >, 4 > matrix
Definition: types.h:121
Matrix class for 3D transforms.
Definition: types.h:119
T x() const
Definition: types.h:36
std::ostream & operator<<(std::ostream &os, const BBox3d &bbox)
3D bounding box class.
Definition: types.h:97
T z() const
Definition: types.h:38
T y() const
Definition: types.h:37