mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 12:10:52 -06:00
Hotfix to make the Sloan Digital Sky Survey work again
This commit is contained in:
@@ -1000,7 +1000,36 @@ std::vector<float> RenderableBillboardsCloud::createDataSlice() {
|
||||
glm::vec3 transformedPos = glm::vec3(_transformationMatrix * glm::vec4(
|
||||
e.position, 1.0
|
||||
));
|
||||
glm::vec4 position(transformedPos, static_cast<float>(_unit));
|
||||
|
||||
float unitValue = 0.f;
|
||||
// (abock, 2022-01-02) This is vestigial from a previous rewrite. I just want to
|
||||
// make it work for now and we can rewrite it properly later
|
||||
switch (_unit) {
|
||||
case DistanceUnit::Meter:
|
||||
unitValue = 0.f;
|
||||
break;
|
||||
case DistanceUnit::Kilometer:
|
||||
unitValue = 1.f;
|
||||
break;
|
||||
case DistanceUnit::Parsec:
|
||||
unitValue = 2;
|
||||
break;
|
||||
case DistanceUnit::Kiloparsec:
|
||||
unitValue = 3;
|
||||
break;
|
||||
case DistanceUnit::Megaparsec:
|
||||
unitValue = 4;
|
||||
break;
|
||||
case DistanceUnit::Gigaparsec:
|
||||
unitValue = 5;
|
||||
break;
|
||||
case DistanceUnit::Gigalightyear:
|
||||
unitValue = 6;
|
||||
break;
|
||||
default: ghoul::MissingCaseException();
|
||||
}
|
||||
|
||||
glm::vec4 position(transformedPos, unitValue);
|
||||
|
||||
const double unitMeter = toMeter(_unit);
|
||||
glm::dvec3 p = glm::dvec3(position) * unitMeter;
|
||||
|
||||
@@ -215,7 +215,6 @@ RenderableDUMeshes::RenderableDUMeshes(const ghoul::Dictionary& dictionary)
|
||||
_unit = codegen::map<DistanceUnit>(*p.unit);
|
||||
}
|
||||
else {
|
||||
LWARNING("No unit given for RenderableDUMeshes. Using meters as units.");
|
||||
_unit = DistanceUnit::Meter;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,8 +57,6 @@ namespace {
|
||||
"modelViewProjectionTransform", "alphaValue", "fadeInValue", "galaxyTexture"
|
||||
};
|
||||
|
||||
constexpr double PARSEC = 0.308567756E17;
|
||||
|
||||
enum BlendMode {
|
||||
BlendModeNormal = 0,
|
||||
BlendModeAdditive
|
||||
|
||||
Reference in New Issue
Block a user