mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-09 05:00:42 -06:00
Improved fade-io/out controls in GUI. Changed default behavior for unknown textures in renderable planes cloud.
This commit is contained in:
@@ -8,21 +8,13 @@ return {
|
||||
Enabled = true,
|
||||
Color = { 1.0, 1.0, 1.0 },
|
||||
Transparency = 0.90,
|
||||
ScaleFactor = 2.3,
|
||||
ScaleFactor = 2.8,
|
||||
File = "speck/galaxy.speck",
|
||||
TexturePath = "textures",
|
||||
Luminosity = "size",
|
||||
ScaleLuminosity = 1.0,
|
||||
--[[
|
||||
TransformationMatrix = {
|
||||
-0.7357425748, 0.67726129641, 0.0, 0.0,
|
||||
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
|
||||
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
|
||||
0.0, 0.0, 0.0, 1.0
|
||||
},
|
||||
]]
|
||||
ScaleLuminosity = 1.0,
|
||||
-- Fade in value in the same unit as "Unit"
|
||||
FadeInThreshould = 0.1,
|
||||
FadeInThreshould = 119441,
|
||||
PlaneMinSize = 5.0,
|
||||
Unit = "pc",
|
||||
},
|
||||
|
||||
Submodule ext/ghoul updated: 2b350ca6a6...ecb186c4ec
@@ -355,7 +355,7 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di
|
||||
, _drawElements(DrawElementsInfo, true)
|
||||
, _drawLabels(DrawLabelInfo, false)
|
||||
, _colorOption(ColorOptionInfo, properties::OptionProperty::DisplayType::Dropdown)
|
||||
, _fadeInDistance(FadeInThreshouldInfo, 0.0, 0.1, 100.0)
|
||||
, _fadeInDistance(FadeInThreshouldInfo, 0.0, 0.0, 100.0)
|
||||
, _disableFadeInDistance(DisableFadeInInfo, true)
|
||||
, _billboardMaxSize(BillboardMaxSizeInfo, 400.0, 0.0, 1000.0)
|
||||
, _billboardMinSize(BillboardMinSizeInfo, 0.0, 0.0, 100.0)
|
||||
@@ -1413,6 +1413,7 @@ void RenderableBillboardsCloud::createDataSlice() {
|
||||
}
|
||||
}
|
||||
|
||||
float biggestCoord = -1.0f;
|
||||
for (size_t i = 0; i < _fullData.size(); i += _nValuesPerAstronomicalObject) {
|
||||
glm::dvec4 transformedPos = _transformationMatrix * glm::dvec4(_fullData[i + 0], _fullData[i + 1], _fullData[i + 2], 1.0);
|
||||
glm::vec4 position(glm::vec3(transformedPos), static_cast<float>(_unit));
|
||||
@@ -1420,6 +1421,7 @@ void RenderableBillboardsCloud::createDataSlice() {
|
||||
if (_hasColorMapFile) {
|
||||
for (auto j = 0; j < 4; ++j) {
|
||||
_slicedData.push_back(position[j]);
|
||||
biggestCoord = biggestCoord < position[j] ? position[j] : biggestCoord;
|
||||
}
|
||||
// Finds from which bin to get the color.
|
||||
// Note: the first color in the colormap file
|
||||
@@ -1445,6 +1447,8 @@ void RenderableBillboardsCloud::createDataSlice() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_fadeInDistance.setMaxValue(10.0f * biggestCoord);
|
||||
}
|
||||
|
||||
void RenderableBillboardsCloud::createPolygonTexture() {
|
||||
|
||||
@@ -583,6 +583,10 @@ void RenderablePlanesCloud::renderPlanes(const RenderData&,
|
||||
_program->setUniform("galaxyTexture", unit);
|
||||
int currentTextureIndex = -1;
|
||||
for (auto renderingPlane : _renderingPlanesArray) {
|
||||
// For planes with undefined textures references
|
||||
if (renderingPlane.planeIndex == -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
glm::dvec4 vertex0(renderingPlane.vertexData[0], renderingPlane.vertexData[1],
|
||||
renderingPlane.vertexData[2], renderingPlane.vertexData[3]);
|
||||
@@ -1216,7 +1220,7 @@ void RenderablePlanesCloud::createPlanes() {
|
||||
// JCC: Ask Abbott about these points refeering to a non-existing texture.
|
||||
if (plane.planeIndex == 30) {
|
||||
//std::cout << "--- Creating planes - index: " << plane.planeIndex << std::endl;
|
||||
plane.planeIndex = 0;
|
||||
plane.planeIndex = -1;
|
||||
}
|
||||
|
||||
glGenVertexArrays(1, &plane.vao);
|
||||
|
||||
Reference in New Issue
Block a user