Pioneer
Loading...
Searching...
No Matches
src
pigui
Radar.h
Go to the documentation of this file.
1
// Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details
2
// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4
#pragma once
5
6
#include "
RefCounted.h
"
7
#include "imgui/imgui.h"
8
#include "
vector2.h
"
9
10
namespace
PiGui
{
11
class
RadarWidget
:
public
RefCounted
{
12
public
:
13
// Draws the radar widget
14
// Expected to be called during a Begin/End ImGui block.
15
void
DrawPiGui
();
16
17
// Set the total size of the radar widget
18
void
SetSize
(ImVec2 size);
19
// Return the total size of the radar widget
20
ImVec2
GetSize
()
const
{
return
m_size; }
21
22
// Set the current zoom distance in meters
23
void
SetCurrentZoom
(
float
zoomDist) { m_currentZoom = zoomDist; }
24
// Return the current zoom distance in meters
25
float
GetCurrentZoom
()
const
{
return
m_currentZoom; }
26
27
// Set the maximum zoom distance in meters
28
void
SetMaxZoom
(
float
maxZoom) { m_maxZoom = maxZoom; }
29
// Return the maximum zoom distance in meters
30
float
GetMaxZoom
()
const
{
return
m_maxZoom; }
31
32
// Set the minimum zoom distance in meters
33
void
SetMinZoom
(
float
minZoom) { m_minZoom = minZoom; }
34
// Return the minimum zoom distance in meters
35
float
GetMinZoom
()
const
{
return
m_minZoom; }
36
37
// Retrieve the size of the radar disk itself
38
ImVec2
GetRadius
()
const
{
return
m_radius; }
39
// Return the position of the center of the radar disk
40
ImVec2
GetCenter
()
const
{
return
m_center; }
41
42
private
:
43
ImVec2 m_size;
44
ImVec2 m_radius;
45
ImVec2 m_center;
46
47
float
m_currentZoom;
48
float
m_maxZoom;
49
float
m_minZoom;
50
};
51
}
// namespace PiGui
RefCounted.h
PiGui::RadarWidget
Definition
Radar.h:11
PiGui::RadarWidget::GetMaxZoom
float GetMaxZoom() const
Definition
Radar.h:30
PiGui::RadarWidget::DrawPiGui
void DrawPiGui()
Definition
Radar.cpp:22
PiGui::RadarWidget::GetSize
ImVec2 GetSize() const
Definition
Radar.h:20
PiGui::RadarWidget::GetMinZoom
float GetMinZoom() const
Definition
Radar.h:35
PiGui::RadarWidget::GetRadius
ImVec2 GetRadius() const
Definition
Radar.h:38
PiGui::RadarWidget::GetCenter
ImVec2 GetCenter() const
Definition
Radar.h:40
PiGui::RadarWidget::SetMaxZoom
void SetMaxZoom(float maxZoom)
Definition
Radar.h:28
PiGui::RadarWidget::SetMinZoom
void SetMinZoom(float minZoom)
Definition
Radar.h:33
PiGui::RadarWidget::SetCurrentZoom
void SetCurrentZoom(float zoomDist)
Definition
Radar.h:23
PiGui::RadarWidget::SetSize
void SetSize(ImVec2 size)
Definition
Radar.cpp:16
PiGui::RadarWidget::GetCurrentZoom
float GetCurrentZoom() const
Definition
Radar.h:25
RefCounted
Definition
RefCounted.h:11
PiGui
Definition
LuaBody.cpp:29
vector2.h
Generated by
1.9.7