mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-04 09:59:44 -05:00
New legend + New hotkeys
Also changed the flux and uniform colortable
This commit is contained in:
@@ -63,7 +63,7 @@ local Keybindings = {
|
||||
{
|
||||
Key = "Shift+r",
|
||||
Command =
|
||||
"openspace.setPropertyValueSingle('Scene.MAS_MHD_StreamNodes.Renderable.Color.colorMode', 1.000000);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.MAS_MHD_StreamNodes.Renderable.Color.colorMode', 0.000000);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.MAS_MHD_StreamNodes.Renderable.NodeGroup.skippingNodes', 1.000000);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.MAS_MHD_StreamNodes.Renderable.NodeGroup.amountOfNodes', 1.000000);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.MAS_MHD_StreamNodes.Renderable.Color.fluxColorAlpha', 1.000000);" ..
|
||||
@@ -105,6 +105,22 @@ local Keybindings = {
|
||||
Documentation = "Toggle volume",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "F7",
|
||||
Command = "openspace.scriptScheduler.loadScheduledScript(EndtimeSlowLoop, StarttimescriptSlowLoop)",
|
||||
Documentation = "Loop time 10:03 - 11:00",
|
||||
Name = "Loop Nodedata time 10:03 - 11:00",
|
||||
GuiPath = "/CCMC/Nodes",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "F8",
|
||||
Command = "openspace.scriptScheduler.loadScheduledScript(Endtime1, Starttimescript)",
|
||||
Documentation = "Loop time 08:34- 19:34",
|
||||
Name = "Loop Nodedata time 08:34 - 19:34",
|
||||
GuiPath = "/CCMC/Nodes",
|
||||
Local = false
|
||||
},
|
||||
{
|
||||
Key = "F9",
|
||||
Command = "openspace.scriptScheduler.clear()",
|
||||
|
||||
@@ -15,16 +15,14 @@ local legend = {
|
||||
Identifier = "Legendstreamnodes",
|
||||
--Type = "ScreenSpaceRenderable",
|
||||
Type = "ScreenSpaceImageLocal",
|
||||
TexturePath = textures .. "/legend.png",
|
||||
TexturePath = textures .. "/CMR_transparent_vittext.png",
|
||||
};
|
||||
|
||||
openspace.addScreenSpaceRenderable(legend)
|
||||
openspace.setPropertyValueSingle('ScreenSpace.Legendstreamnodes.CartesianPosition', {0.915250,-0.033900,-1.278690});
|
||||
openspace.setPropertyValueSingle('ScreenSpace.Legendstreamnodes.CartesianPosition', {0.677970, 0.0,-1.049180});
|
||||
-- openspace.setPropertyValueSingle('ScreenSpace.Legendstreamnodes.CartesianPosition', {0.915250,-0.033900,-1.508200});
|
||||
openspace.setPropertyValueSingle('ScreenSpace.Legendstreamnodes.Rotation', {0.000000,0.000000,0.5});
|
||||
openspace.setPropertyValueSingle('ScreenSpace.Legendstreamnodes.Scale', 0.056340);
|
||||
-- openspace.setPropertyValueSingle('ScreenSpace.Legendstreamnodes.Scale', 0.037560);
|
||||
-- openspace.setPropertyValueSingle('ScreenSpace.Legendstreamnodes.Scale', 0.075120);
|
||||
openspace.setPropertyValueSingle('ScreenSpace.Legendstreamnodes.Rotation', {0.000000,0.000000,0.56652});
|
||||
openspace.setPropertyValueSingle('ScreenSpace.Legendstreamnodes.Scale', 0.15);
|
||||
openspace.setPropertyValueSingle('ScreenSpace.Legendstreamnodes.Enabled', false);
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, { legend })
|
||||
|
||||
@@ -1189,8 +1189,8 @@ void RenderableStreamNodes::setupProperties() {
|
||||
// --------------------- Add Options to OptionProperties --------------------- //
|
||||
_pGoesEnergyBins.addOption(static_cast<int>(GoesEnergyBins::Emin01), "Emin01");
|
||||
_pGoesEnergyBins.addOption(static_cast<int>(GoesEnergyBins::Emin03), "Emin03");
|
||||
_pColorMode.addOption(static_cast<int>(ColorMethod::Uniform), "Uniform");
|
||||
_pColorMode.addOption(static_cast<int>(ColorMethod::ByFluxValue), "By Flux Value");
|
||||
_pColorMode.addOption(static_cast<int>(ColorMethod::Uniform), "Uniform");
|
||||
|
||||
_pScalingmethod.addOption(static_cast<int>(ScalingMethod::Flux), "Flux");
|
||||
_pScalingmethod.addOption(static_cast<int>(ScalingMethod::RFlux), "Radius * Flux");
|
||||
@@ -1799,22 +1799,4 @@ void RenderableStreamNodes::updateVertexStreamNumberBuffer() {
|
||||
|
||||
unbindGL();
|
||||
}
|
||||
/*void RenderableStreamNodes::updateArrow() {
|
||||
|
||||
float positionsForArrow[9] = {
|
||||
-0.5f, -0.5f, 0.0f,
|
||||
0.0f, 0.5f, 0.0f,
|
||||
0.5f, -0.5f, 0.0f
|
||||
};
|
||||
|
||||
glBindVertexArray(_vertexArrayObject);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _arrow);
|
||||
glBufferData(GL_ARRAY_BUFFER, 9 * sizeof(float), positionsForArrow, GL_STATIC_DRAW);
|
||||
|
||||
glEnableVertexAttribArray(Arrow);
|
||||
glVertexAttribPointer(Arrow, 3, GL_FLOAT, GL_FALSE, sizeof(float) * 3, 0);
|
||||
glDrawArrays(GL_TRIANGLES, 0, 3);
|
||||
|
||||
unbindGL();
|
||||
}*/
|
||||
} // namespace openspace
|
||||
|
||||
@@ -59,8 +59,8 @@ private:
|
||||
// ------------------------------------- ENUMS -------------------------------------//
|
||||
// Used to determine if lines should be colored UNIFORMLY or by Flux Value
|
||||
enum class ColorMethod : int {
|
||||
Uniform = 0,
|
||||
ByFluxValue = 1
|
||||
ByFluxValue = 0,
|
||||
Uniform = 1
|
||||
};
|
||||
enum class GoesEnergyBins : int {
|
||||
Emin01 = 0,
|
||||
|
||||
@@ -136,8 +136,8 @@ in vec2 in_st;
|
||||
//in vec2 arrow;
|
||||
|
||||
// These should correspond to the enum 'ColorMode' in renderablestreamnodes.cpp
|
||||
const int uniformColor = 0;
|
||||
const int colorByFluxValue = 1;
|
||||
const int colorByFluxValue = 0;
|
||||
const int uniformColor = 1;
|
||||
|
||||
const int uniformskip = 0;
|
||||
const int fluxSkip = 1;
|
||||
@@ -327,12 +327,8 @@ void main() {
|
||||
//Filtering by radius and z-axis
|
||||
if(rValue > filterLower && rValue < filterUpper){ //if(rValue > filterLower){
|
||||
if(in_position.z > domainLimZ.x && in_position.z < domainLimZ.y){
|
||||
//Uniform coloring
|
||||
// We should color it by flux
|
||||
if(colorMode == 0){
|
||||
vs_color = streamColor;
|
||||
}
|
||||
// We should color it by flux.
|
||||
else{
|
||||
//vec4 fluxColor = getTransferFunctionColor(colorTable);
|
||||
vec4 fluxColor = getTransferFunctionColor(colorTableCMR);
|
||||
if(fluxValue > thresholdFlux){
|
||||
@@ -343,6 +339,10 @@ void main() {
|
||||
vs_color = vec4(fluxColor.xyz, fluxColorAlpha);
|
||||
gl_PointSize = nodeSize;
|
||||
}
|
||||
}
|
||||
//Uniform coloring
|
||||
else{
|
||||
vs_color = streamColor;
|
||||
}
|
||||
CheckdistanceMethod();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user