blob: 3f47a10c3a02bf184a2075d3abbf52ce81aaa1ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#pragma once
#include "animation/show_hide_animation.hpp"
#include "animation/value_mapping.hpp"
#include "render_node.hpp"
#include "geometry/point2d.hpp"
#include "geometry/screenbase.hpp"
namespace dp
{
class GpuProgramManager;
class UniformValuesStorage;
class TextureManager;
}
namespace df
{
class SelectionShape
{
public:
enum ESelectedObject
{
OBJECT_EMPTY,
OBJECT_POI,
OBJECT_USER_MARK,
OBJECT_MY_POSITION
};
SelectionShape(ref_ptr<dp::TextureManager> mng);
void SetPosition(m2::PointD const & position) { m_position = position; }
void Show(ESelectedObject obj, m2::PointD const & position, double positionZ, bool isAnimate);
void Hide();
void Render(ScreenBase const & screen, int zoomLevel, ref_ptr<dp::GpuProgramManager> mng,
dp::UniformValuesStorage const & commonUniforms);
ESelectedObject GetSelectedObject() const;
private:
double GetCurrentRadius() const;
private:
m2::PointD m_position;
double m_positionZ;
ShowHideAnimation m_animation;
ESelectedObject m_selectedObject;
drape_ptr<RenderNode> m_renderNode;
ValueMapping<float> m_mapping;
};
} // namespace df
|