picking_data.hpp
Go to the documentation of this file.
1 /*
2 ** TP CPE Lyon
3 ** Copyright (C) 2014 Damien Rohmer
4 **
5 ** This program is free software: you can redistribute it and/or modify
6 ** it under the terms of the GNU General Public License as published by
7 ** the Free Software Foundation, either version 3 of the License, or
8 ** (at your option) any later version.
9 **
10 ** This program is distributed in the hope that it will be useful,
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ** GNU General Public License for more details.
14 **
15 ** You should have received a copy of the GNU General Public License
16 ** along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #pragma once
20 
21 #ifndef PICKING_DATA_HPP
22 #define PICKING_DATA_HPP
23 
24 #include "../lib3d/vec3.hpp"
25 #include <map>
26 
27 namespace cpe
28 {
31 {
32  public:
33 
35  picking_data();
36 
38  bool get_is_picked() const;
40  void set_is_picked(bool value);
41 
43  const std::map<unsigned int,std::pair<unsigned int,unsigned int> >& get_picked_index() const;
45  void set_picked_index(const std::map<unsigned int,std::pair<unsigned int,unsigned int> >& value);
46 
48  bool get_is_up_to_date() const;
50  void set_is_up_to_date(bool value);
51 
52 
53 
54  private:
55 
57  bool is_picked;
63  std::map<unsigned int,std::pair<unsigned int,unsigned int> > picked_index;
64 
65 };
66 }
67 
68 #endif
void set_is_picked(bool value)
set the is_picked value
Definition: picking_data.cpp:28
const std::map< unsigned int, std::pair< unsigned int, unsigned int > > & get_picked_index() const
get the picked indices
Definition: picking_data.cpp:30
std::map< unsigned int, std::pair< unsigned int, unsigned int > > picked_index
Internal storage of the picked indices (unique ID,<u_index,v_index>) The unique ID is given by u_inde...
Definition: picking_data.hpp:63
void set_picked_index(const std::map< unsigned int, std::pair< unsigned int, unsigned int > > &value)
set the picked indices
Definition: picking_data.cpp:31
Helper class to store picking parameters.
Definition: picking_data.hpp:30
picking_data()
Defaut constructor.
Definition: picking_data.cpp:23
void set_is_up_to_date(bool value)
set the is_up_to_date value
Definition: picking_data.cpp:34
bool is_up_to_date
Internal storage to know if the surface is up to date and at high resolution.
Definition: picking_data.hpp:59
bool get_is_picked() const
get the is_picked value
Definition: picking_data.cpp:27
bool get_is_up_to_date() const
get the is_up_to_date value
Definition: picking_data.cpp:33
bool is_picked
Internal storage to know if the picking mode is active.
Definition: picking_data.hpp:57