Skip to content

Commit b741bab

Browse files
author
Haydelj
committed
finished implmenting colormap transparency in showfield and cleaned up showFieldGlyphs a bit
1 parent 3c2803a commit b741bab

File tree

2 files changed

+329
-339
lines changed

2 files changed

+329
-339
lines changed

src/Modules/Visualization/ShowField.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,9 @@ void GeometryBuilder::renderNodes(
844844
ColorScheme colorScheme;
845845
ColorRGB node_color;
846846

847+
ColorMapHandle textureMap, coordinateMap;
848+
spiltColorMapToTextureAndCoordinates(colorMap, textureMap, coordinateMap);
849+
847850
if (fld->basis_order() < 0 || (fld->basis_order() == 0 && mesh->dimensionality() != 0) || state.get(RenderState::USE_DEFAULT_COLOR_NODES))
848851
colorScheme = ColorScheme::COLOR_UNIFORM;
849852
else if (state.get(RenderState::USE_COLORMAP_ON_NODES))
@@ -887,17 +890,17 @@ void GeometryBuilder::renderNodes(
887890
if (fld->is_scalar())
888891
{
889892
fld->get_value(sval, *eiter);
890-
node_color = map->valueToColor(sval);
893+
node_color = coordinateMap->valueToColor(sval);
891894
}
892895
else if (fld->is_vector())
893896
{
894897
fld->get_value(vval, *eiter);
895-
node_color = map->valueToColor(vval);
898+
node_color = coordinateMap->valueToColor(vval);
896899
}
897900
else if (fld->is_tensor())
898901
{
899902
fld->get_value(tval, *eiter);
900-
node_color = map->valueToColor(tval);
903+
node_color = coordinateMap->valueToColor(tval);
901904
}
902905
}
903906
//accumulate VBO or IBO data
@@ -914,7 +917,7 @@ void GeometryBuilder::renderNodes(
914917
}
915918

916919
glyphs.buildObject(*geom, uniqueNodeID, state.get(RenderState::USE_TRANSPARENT_NODES), nodeTransparencyValue_,
917-
colorScheme, state, primIn, mesh->get_bounding_box());
920+
colorScheme, state, primIn, mesh->get_bounding_box(), true, textureMap);
918921
}
919922

920923

0 commit comments

Comments
 (0)