blob: 65abf0b1769913892d43b212b55b91dea7422f91 (
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
#pragma once
#include "arrow3d.hpp"
#include "render_node.hpp"
#include "drape/vertex_array_buffer.hpp"
#include "drape/glstate.hpp"
#include "drape/gpu_program_manager.hpp"
#include "drape/texture_manager.hpp"
#include "drape/uniform_values_storage.hpp"
#include "drape/batcher.hpp"
#include "geometry/screenbase.hpp"
namespace df
{
class MyPosition
{
public:
MyPosition(ref_ptr<dp::TextureManager> mng);
///@param pt = mercator point
void SetPosition(m2::PointF const & pt);
void SetAzimuth(float azimut);
void SetIsValidAzimuth(bool isValid);
void SetAccuracy(float accuracy);
void SetRoutingMode(bool routingMode);
void SetPositionObsolete(bool obsolete);
void RenderAccuracy(ScreenBase const & screen,
ref_ptr<dp::GpuProgramManager> mng,
dp::UniformValuesStorage const & commonUniforms);
void RenderMyPosition(ScreenBase const & screen,
ref_ptr<dp::GpuProgramManager> mng,
dp::UniformValuesStorage const & commonUniforms);
private:
void CacheAccuracySector(ref_ptr<dp::TextureManager> mng);
void CachePointPosition(ref_ptr<dp::TextureManager> mng);
enum EMyPositionPart
{
// don't change order and values
MY_POSITION_ACCURACY = 0,
MY_POSITION_POINT = 1,
};
void RenderPart(ref_ptr<dp::GpuProgramManager> mng,
dp::UniformValuesStorage const & uniforms,
EMyPositionPart part);
void CacheSymbol(dp::TextureManager::SymbolRegion const & symbol,
dp::GLState const & state, dp::Batcher & batcher,
EMyPositionPart part);
m2::PointF m_position;
float m_azimuth;
float m_accuracy;
bool m_showAzimuth;
bool m_isRoutingMode;
bool m_obsoletePosition;
using TPart = pair<dp::IndicesRange, size_t>;
vector<TPart> m_parts;
vector<RenderNode> m_nodes;
Arrow3d m_arrow3d;
};
}
|