TargetPriority.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package view_selection::ArmarXObjects::client
17  * @author Johann Mantel ( j-mantel at gmx dot net )
18  * @date 2022
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 #include <iosfwd>
26 
27 #include "AttentionType.h"
28 
30 {
31  /**
32  * @defgroup Library-client objects
33  * @ingroup view_selection
34  *
35  * @class TargetPriority
36  * @ingroup Library-client
37  * @brief The Priority of a GazeTarget
38  */
40  {
41  public:
43  double priority = -1);
44 
45  bool operator<(const TargetPriority& rhs) const;
46 
47  bool operator<=(const TargetPriority& rhs) const;
48 
49  bool operator==(const TargetPriority& rhs) const;
50 
51  bool operator!=(const TargetPriority& rhs) const;
52 
53  bool operator>=(const TargetPriority& rhs) const;
54 
55  bool operator>(const TargetPriority& rhs) const;
56 
57  public:
58  /// The type of attention, defining the first level of priority
60  /// The priority among GazeTargets of same AttentionType
61  double priority;
62  };
63 
64  std::ostream& operator<<(std::ostream& os, const TargetPriority& prio);
65 
66 } // namespace armarx::view_selection::gaze_targets
armarx::view_selection::gaze_targets::TargetPriority::operator!=
bool operator!=(const TargetPriority &rhs) const
Definition: TargetPriority.cpp:55
armarx::view_selection::gaze_targets::TargetPriority::priority
double priority
The priority among GazeTargets of same AttentionType.
Definition: TargetPriority.h:61
armarx::view_selection::gaze_targets::operator<<
::std::ostream & operator<<(::std::ostream &os, const GazeTarget &target)
Definition: GazeTarget.cpp:75
armarx::view_selection::gaze_targets::TargetPriority::operator==
bool operator==(const TargetPriority &rhs) const
Definition: TargetPriority.cpp:49
armarx::view_selection::gaze_targets::AttentionType
AttentionType
Describes the type of attention.
Definition: AttentionType.h:32
armarx::view_selection::gaze_targets::TargetPriority::operator<=
bool operator<=(const TargetPriority &rhs) const
Definition: TargetPriority.cpp:42
armarx::view_selection::gaze_targets::AttentionType::RandomEvent
@ RandomEvent
Random Targets with lowest priority.
armarx::view_selection::gaze_targets
Definition: aron_conversions.cpp:25
AttentionType.h
armarx::view_selection::gaze_targets::TargetPriority::TargetPriority
TargetPriority(const AttentionType &attentionType=AttentionType::RandomEvent, double priority=-1)
Definition: TargetPriority.cpp:29
armarx::view_selection::gaze_targets::TargetPriority::operator>=
bool operator>=(const TargetPriority &rhs) const
Definition: TargetPriority.cpp:61
armarx::view_selection::gaze_targets::TargetPriority::attentionType
AttentionType attentionType
The type of attention, defining the first level of priority.
Definition: TargetPriority.h:59
armarx::view_selection::gaze_targets::TargetPriority
The Priority of a GazeTarget.
Definition: TargetPriority.h:39
armarx::view_selection::gaze_targets::TargetPriority::operator>
bool operator>(const TargetPriority &rhs) const
Definition: TargetPriority.cpp:68
armarx::view_selection::gaze_targets::TargetPriority::operator<
bool operator<(const TargetPriority &rhs) const
Definition: TargetPriority.cpp:35