ptu_tuple.cpp
Go to the documentation of this file.
1 
18 #include <model/ptu_tuple.hpp>
19 
20 namespace directSearchWS {
21 
22 PtuTuple::PtuTuple(int pan, int tilt, PosePtr cameraPosePtr) : PtuTuple(pan, tilt, cameraPosePtr, -1) {
23 }
24 
26  PtuTuple(pan, tilt, cameraPosePtr, deactivated_object_normals_count, SearchedObjectTypes()) {
27 }
28 
30  PtuTuple(pan, tilt, cameraPosePtr, deactivated_object_normals_count, already_searched_object_types, asr_next_best_view::RatedViewport()){
31 }
32 
34  asr_next_best_view::RatedViewport ratedViewport) : pan(pan), tilt(tilt), cameraPosePtr(cameraPosePtr), deactivated_object_normals_count(deactivated_object_normals_count),
35  already_searched_object_types(already_searched_object_types), ratedViewport(ratedViewport) {
36 }
37 
38 
39 int PtuTuple::getPan() const {
40  return pan;
41 }
42 
43 int PtuTuple::getTilt() const {
44  return tilt;
45 }
46 
49 }
50 
51 void PtuTuple::addAlreadySearchedObjectType(std::string newAlreadySearchedObjectType) {
52  if (std::find(already_searched_object_types.begin(), already_searched_object_types.end(), newAlreadySearchedObjectType) == already_searched_object_types.end()) {
53  already_searched_object_types.push_back(newAlreadySearchedObjectType);
54  }
55 }
56 
57 void PtuTuple::addAlreadySearchedObjectTypes(const SearchedObjectTypes &newAlreadySearchedObjectTypes) {
58  for (const std::string &newSearchedObjectType : newAlreadySearchedObjectTypes) {
59  addAlreadySearchedObjectType(newSearchedObjectType);
60  }
61 }
62 
65 }
66 
68  return cameraPosePtr;
69 }
70 
73 }
74 
75 void PtuTuple::setRatedViewport(const asr_next_best_view::RatedViewport &newRatedViewport) {
76  ratedViewport = newRatedViewport;
77 }
78 
79 asr_next_best_view::RatedViewport PtuTuple::getRatedViewport() const {
80  return ratedViewport;
81 }
82 
83 
84 std::ostream& operator<<(std::ostream &strm, const PosePtr &pose_ptr) {
85  return strm << *pose_ptr;
86 }
87 
88 std::ostream& operator<<(std::ostream &strm, const SearchedObjectTypes &already_searched_object_types) {
89  strm << "(already) searched object types:";
90  for (const std::string &object_type : already_searched_object_types) {
91  strm << " " << object_type;
92  }
93  strm << '\n';
94  return strm;
95 }
96 
97 
98 std::ostream& operator<<(std::ostream &strm, const PtuTuple &ptu_tuple) {
99  strm << "PTU tuple:\n";
100  strm << "pan: " << ptu_tuple.getPan() << " tilt: " << ptu_tuple.getTilt() << '\n';
101  strm << ptu_tuple.getAlreadySearchedObjectTypes();
102  strm << "CameraPose:\n" << ptu_tuple.getCameraPosePtr();
103  strm << "DeactivatedObjectNormalsCount: " << ptu_tuple.getDeactivatedObjectNormalsCount() << '\n';
104  strm << "RatedViewport: " << ptu_tuple.getRatedViewport();
105  return strm;
106 }
107 
108 std::ostream& operator<<(std::ostream &strm, const PtuTuplePtr &ptu_tuple_ptr) {
109  return strm << *ptu_tuple_ptr;
110 }
111 
112 std::ostream& operator<<(std::ostream &strm, const PtuTuplePtrVec &ptu_tuple_ptr_vec) {
113  for (const PtuTuplePtr &ptu_tuple_ptr : ptu_tuple_ptr_vec) {
114  strm << ptu_tuple_ptr;
115  }
116  return strm;
117 }
118 
119 std::ostream& operator<<(std::ostream &strm, const PtuTuplePtrVecPtr &ptu_tuple_ptr_vec_ptr) {
120  return strm << *ptu_tuple_ptr_vec_ptr;
121 }
122 }
void resetAlreadySearchedObjectTypes()
Definition: ptu_tuple.cpp:63
PtuTuple(int pan, int tilt, PosePtr cameraPosePtr)
Definition: ptu_tuple.cpp:22
std::vector< std::string > SearchedObjectTypes
Definition: ptu_tuple.hpp:27
void addAlreadySearchedObjectType(std::string newAlreadySearchedObjectType)
Definition: ptu_tuple.cpp:51
asr_next_best_view::RatedViewport getRatedViewport() const
Definition: ptu_tuple.cpp:79
std::ostream & operator<<(std::ostream &strm, const SearchedObjectTypes &already_searched_object_types)
Definition: ptu_tuple.cpp:88
std::vector< PtuTuplePtr > PtuTuplePtrVec
Definition: ptu_tuple.hpp:70
SearchedObjectTypes already_searched_object_types
Definition: ptu_tuple.hpp:37
int getDeactivatedObjectNormalsCount() const
Definition: ptu_tuple.cpp:71
SearchedObjectTypes getAlreadySearchedObjectTypes() const
Definition: ptu_tuple.cpp:47
void setRatedViewport(const asr_next_best_view::RatedViewport &newRatedViewport)
Definition: ptu_tuple.cpp:75
asr_next_best_view::RatedViewport ratedViewport
Definition: ptu_tuple.hpp:38
PosePtr getCameraPosePtr() const
Definition: ptu_tuple.cpp:67
void addAlreadySearchedObjectTypes(const SearchedObjectTypes &newAlreadySearchedObjectTypes)
Definition: ptu_tuple.cpp:57


asr_direct_search_manager
Author(s): Borella Jocelyn, Karrenbauer Oliver, Meißner Pascal
autogenerated on Wed Jan 8 2020 03:15:41