Quantum Phenomena Explorer
7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
quantumpotentialeditor2d.h
Go to the documentation of this file.
1
/**
2
* @file quantumpotentialeditor2d.h
3
* @brief Declares the quantumpotentialeditor2d visualization component used by QPE.
4
* @ingroup qpe_graphics
5
*
6
* Source: @c graphics/renderer/quantumpotentialeditor2d.h. This file is part of Quantum Phenomena Explorer (QPE),
7
* maintained by Officina Turini. See LICENSE_IT.txt / LICENSE.txt for the
8
* QPE freeware source-available terms and THIRD_PARTY_NOTICES.txt for
9
* third-party components.
10
*/
11
12
#pragma once
13
14
namespace
qpe
{
15
16
/**
17
* @brief Enumerates the supported Potential Editor Tool values.
18
*
19
* The enumeration is part of the typed interface used to keep experiment configuration and analysis routing explicit.
20
*/
21
enum class
PotentialEditorTool
22
{
23
Rectangle
= 0,
24
Circle
25
};
26
27
/**
28
* @brief Data structure used by the Potential Editor Shape component.
29
*
30
* The structure keeps related values explicit and testable across the QPE physics, analysis, or persistence layers.
31
*/
32
struct
PotentialEditorShape
33
{
34
PotentialEditorTool
tool
=
PotentialEditorTool::Rectangle
;
35
float
centerX
= 0.0f;
36
float
centerY
= 0.0f;
37
float
width
= 0.0f;
38
float
height
= 0.0f;
39
float
radius
= 0.0f;
40
41
/**
42
* @brief Performs valid.
43
*/
44
bool
valid
() const noexcept;
45
};
46
47
/**
48
* @brief Implements the Potential Editor2D component.
49
*
50
* The class provides one focused service within the QPE architecture and is documented here independently of the experiment-level Help.
51
*/
52
class
PotentialEditor2D
53
{
54
public
:
55
/**
56
* @brief Performs rectangle from drag.
57
* @param x1 The x1 value used by the operation.
58
* @param y1 The y1 value used by the operation.
59
* @param x2 The x2 value used by the operation.
60
* @param y2 The y2 value used by the operation.
61
* @param minimumWidth The minimum width value used by the operation.
62
* @param minimumHeight The minimum height value used by the operation.
63
*/
64
static
PotentialEditorShape
rectangleFromDrag(
float
x1,
65
float
y1,
66
float
x2,
67
float
y2,
68
float
minimumWidth,
69
float
minimumHeight)
noexcept
;
70
71
/**
72
* @brief Performs circle from drag.
73
* @param centerX The center x value used by the operation.
74
* @param centerY The center y value used by the operation.
75
* @param edgeX The edge x value used by the operation.
76
* @param edgeY The edge y value used by the operation.
77
* @param minimumRadius The minimum radius value used by the operation.
78
*/
79
static
PotentialEditorShape
circleFromDrag(
float
centerX
,
80
float
centerY
,
81
float
edgeX,
82
float
edgeY,
83
float
minimumRadius)
noexcept
;
84
};
85
86
}
// namespace qpe
qpe::PotentialEditor2D
Implements the Potential Editor2D component.
Definition
quantumpotentialeditor2d.h:53
qpe
Definition
mainwindow.h:76
qpe::PotentialEditorTool
PotentialEditorTool
Enumerates the supported Potential Editor Tool values.
Definition
quantumpotentialeditor2d.h:22
qpe::PotentialEditorTool::Rectangle
@ Rectangle
qpe::PotentialObjectType2D::Circle
@ Circle
qpe::PotentialObjectType2D::Rectangle
@ Rectangle
qpe::PotentialEditorShape
Data structure used by the Potential Editor Shape component.
Definition
quantumpotentialeditor2d.h:33
qpe::PotentialEditorShape::centerX
float centerX
Definition
quantumpotentialeditor2d.h:35
qpe::PotentialEditorShape::width
float width
Definition
quantumpotentialeditor2d.h:37
qpe::PotentialEditorShape::valid
bool valid() const noexcept
Performs valid.
Definition
quantumpotentialeditor2d.cpp:19
qpe::PotentialEditorShape::height
float height
Definition
quantumpotentialeditor2d.h:38
qpe::PotentialEditorShape::radius
float radius
Definition
quantumpotentialeditor2d.h:39
qpe::PotentialEditorShape::centerY
float centerY
Definition
quantumpotentialeditor2d.h:36
qpe::PotentialEditorShape::tool
PotentialEditorTool tool
Definition
quantumpotentialeditor2d.h:34
graphics
renderer
quantumpotentialeditor2d.h
Generated by
1.12.0