Skip to content

Commit 9e26811

Browse files
committed
変数名の変更
1 parent 2414a4b commit 9e26811

37 files changed

+743
-743
lines changed

curve_editor/control_point.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,39 @@
44

55

66
namespace cved {
7-
bool ControlPoint::is_hovered(const mkaul::Point<double>& point, const GraphView& view) const noexcept {
7+
bool ControlPoint::is_hovered(const mkaul::Point<double>& pt, const GraphView& view) const noexcept {
88
constexpr float BOX_WIDTH = 20.f;
99

1010
bool in_range_x = mkaul::in_range(
11-
point.x, point_.x - BOX_WIDTH / view.scale_x() * 0.5,
12-
point_.x + BOX_WIDTH / view.scale_x() * 0.5, true
11+
pt.x, pt_.x - BOX_WIDTH / view.scale_x() * 0.5,
12+
pt_.x + BOX_WIDTH / view.scale_x() * 0.5, true
1313
);
1414
bool in_range_y = mkaul::in_range(
15-
point.y, point_.y - BOX_WIDTH / view.scale_y() * 0.5,
16-
point_.y + BOX_WIDTH / view.scale_y() * 0.5, true
15+
pt.y, pt_.y - BOX_WIDTH / view.scale_y() * 0.5,
16+
pt_.y + BOX_WIDTH / view.scale_y() * 0.5, true
1717
);
1818
return in_range_x and in_range_y;
1919
}
2020

21-
bool ControlPoint::check_hover(const mkaul::Point<double>& point, const GraphView& view) noexcept {
22-
if (is_hovered(point, view)) {
21+
bool ControlPoint::check_hover(const mkaul::Point<double>& pt, const GraphView& view) noexcept {
22+
if (is_hovered(pt, view)) {
2323
controlled_ = true;
2424
return true;
2525
}
2626
else return false;
2727
}
2828

29-
bool ControlPoint::update(const mkaul::Point<double>& point) noexcept {
29+
bool ControlPoint::update(const mkaul::Point<double>& pt) noexcept {
3030
if (controlled_) {
31-
move(point);
31+
move(pt);
3232
return true;
3333
}
3434
else return false;
3535
}
3636

37-
void ControlPoint::move(const mkaul::Point<double>& point) noexcept {
37+
void ControlPoint::move(const mkaul::Point<double>& pt) noexcept {
3838
if (!fixed_) {
39-
point_ = point;
39+
pt_ = pt;
4040
}
4141
}
4242
}

curve_editor/control_point.hpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,34 @@ namespace cved {
99
// 操作可能なポイント
1010
class ControlPoint {
1111
private:
12-
mkaul::Point<double> point_;
12+
mkaul::Point<double> pt_;
1313
bool controlled_;
1414
bool fixed_;
1515

1616
public:
17-
constexpr ControlPoint(const mkaul::Point<double>& point = mkaul::Point<double>{}, bool fixed = false) :
18-
point_{point},
17+
constexpr ControlPoint(const mkaul::Point<double>& pt = mkaul::Point<double>{}, bool fixed = false) :
18+
pt_{pt},
1919
controlled_{false},
2020
fixed_{fixed}
2121
{}
2222

23-
auto operator = (const mkaul::Point<double>& point) noexcept {
24-
this->point_ = point;
23+
auto operator = (const mkaul::Point<double>& pt) noexcept {
24+
this->pt_ = pt;
2525
return *this;
2626
}
2727

2828
// アクセッサ
29-
const auto& point() const noexcept { return point_; }
30-
auto x() const noexcept { return point_.x; }
31-
auto y() const noexcept { return point_.y; }
29+
const auto& pt() const noexcept { return pt_; }
30+
auto x() const noexcept { return pt_.x; }
31+
auto y() const noexcept { return pt_.y; }
3232

3333
// 引数のポイントがコントロールポイント付近にあるかどうか
34-
bool is_hovered(const mkaul::Point<double>& point, const GraphView& view) const noexcept;
34+
bool is_hovered(const mkaul::Point<double>& pt, const GraphView& view) const noexcept;
3535
bool is_controlled() const noexcept { return controlled_; }
36-
bool check_hover(const mkaul::Point<double>& point, const GraphView& view) noexcept;
36+
bool check_hover(const mkaul::Point<double>& pt, const GraphView& view) noexcept;
3737

38-
bool update(const mkaul::Point<double>& point) noexcept;
39-
void move(const mkaul::Point<double>& point) noexcept;
38+
bool update(const mkaul::Point<double>& pt) noexcept;
39+
void move(const mkaul::Point<double>& pt) noexcept;
4040

4141
void end_control() noexcept { controlled_ = false; }
4242
};

0 commit comments

Comments
 (0)