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
bool operator>=(const TargetPriority &rhs) const
bool operator<(const TargetPriority &rhs) const
bool operator>(const TargetPriority &rhs) const
bool operator==(const TargetPriority &rhs) const
AttentionType attentionType
The type of attention, defining the first level of priority.
bool operator<=(const TargetPriority &rhs) const
TargetPriority(const AttentionType &attentionType=AttentionType::RandomEvent, double priority=-1)
bool operator!=(const TargetPriority &rhs) const
double priority
The priority among GazeTargets of same AttentionType.
AttentionType
Describes the type of attention.
@ RandomEvent
Random Targets with lowest priority.
::std::ostream & operator<<(::std::ostream &os, const GazeTarget &target)