mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-02 01:30:34 -06:00
Address some more PR comments
This commit is contained in:
@@ -365,7 +365,7 @@ local plane1kly = {
|
||||
},
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 1000
|
||||
Scale = 1E3
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
@@ -393,7 +393,7 @@ local plane10kly = {
|
||||
},
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 10000
|
||||
Scale = 10E3
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
@@ -416,7 +416,7 @@ local plane100kly = {
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 100000
|
||||
Scale = 100E3
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
@@ -441,7 +441,7 @@ local plane1Mly = {
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 1000000
|
||||
Scale = 1E6
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
@@ -466,7 +466,7 @@ local plane10Mly = {
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 10000000
|
||||
Scale = 10E6
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
@@ -491,7 +491,7 @@ local plane100Mly = {
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 100000000
|
||||
Scale = 100E6
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
@@ -516,7 +516,7 @@ local plane20Gly = {
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 20000000000
|
||||
Scale = 20E9
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
|
||||
@@ -58,7 +58,9 @@ namespace {
|
||||
constexpr openspace::properties::Property::PropertyInfo HighlightRateInfo = {
|
||||
"HighlightRate",
|
||||
"Highlight Rate",
|
||||
"The rate the columns and rows are highlighted"
|
||||
"The rate that the columns and rows are highlighted, counted with respect to the "
|
||||
"center of the grid. If the number of segments in the grid is odd, the "
|
||||
"highlighting might be offsett from the center."
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo LineWidthInfo = {
|
||||
@@ -285,16 +287,15 @@ void RenderableGrid::update(const UpdateData&) {
|
||||
const float x1 = x0 + step.x;
|
||||
|
||||
// Line in y direction
|
||||
bool shouldHighlight = false;
|
||||
if (_highlightRate.value().y != 0) {
|
||||
int rest = static_cast<int>(i - center.y) % _highlightRate.value().y;
|
||||
if (abs(rest) == 0) {
|
||||
_highlightArray.push_back({ x0, y0, 0.f });
|
||||
_highlightArray.push_back({ x0, y1, 0.f });
|
||||
}
|
||||
else {
|
||||
_varray.push_back({ x0, y0, 0.f });
|
||||
_varray.push_back({ x0, y1, 0.f });
|
||||
}
|
||||
shouldHighlight = abs(rest) == 0;
|
||||
}
|
||||
|
||||
if (shouldHighlight) {
|
||||
_highlightArray.push_back({ x0, y0, 0.f });
|
||||
_highlightArray.push_back({ x0, y1, 0.f });
|
||||
}
|
||||
else {
|
||||
_varray.push_back({ x0, y0, 0.f });
|
||||
@@ -302,16 +303,15 @@ void RenderableGrid::update(const UpdateData&) {
|
||||
}
|
||||
|
||||
// Line in x direction
|
||||
shouldHighlight = false;
|
||||
if (_highlightRate.value().x != 0) {
|
||||
int rest = static_cast<int>(j - center.x) % _highlightRate.value().x;
|
||||
if (abs(rest) == 0) {
|
||||
_highlightArray.push_back({ x0, y0, 0.f });
|
||||
_highlightArray.push_back({ x1, y0, 0.f });
|
||||
}
|
||||
else {
|
||||
_varray.push_back({ x0, y0, 0.f });
|
||||
_varray.push_back({ x1, y0, 0.f });
|
||||
}
|
||||
shouldHighlight = abs(rest) == 0;
|
||||
}
|
||||
|
||||
if (shouldHighlight) {
|
||||
_highlightArray.push_back({ x0, y0, 0.f });
|
||||
_highlightArray.push_back({ x1, y0, 0.f });
|
||||
}
|
||||
else {
|
||||
_varray.push_back({ x0, y0, 0.f });
|
||||
|
||||
Reference in New Issue
Block a user