Skip to content

Commit 822e847

Browse files
committed
closes #988 closes #1046
1 parent 7f1d1bf commit 822e847

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Modules/Visualization/ShowFieldGlyphs.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,12 @@ void ShowFieldGlyphs::renderVectors(
305305
if (colorScheme == GeometryObject::COLOR_MAP)
306306
{
307307
ColorMapHandle map = colorMap.get();
308-
node_color = map->valueToColor(v.length());
308+
node_color = map->valueToColor(inputVector);
309309
}
310310
if (colorScheme == GeometryObject::COLOR_IN_SITU)
311311
{
312312
Vector colorVector = inputVector.normal();
313-
node_color = ColorRGB(colorVector.x(), colorVector.y(), colorVector.z());
313+
node_color = ColorRGB(std::abs(colorVector.x()), std::abs(colorVector.y()), std::abs(colorVector.z()));
314314
}
315315
}
316316
else
@@ -370,12 +370,12 @@ void ShowFieldGlyphs::renderVectors(
370370
if (colorScheme == GeometryObject::COLOR_MAP)
371371
{
372372
ColorMapHandle map = colorMap.get();
373-
node_color = map->valueToColor(v.length());
373+
node_color = map->valueToColor(inputVector);
374374
}
375375
if (colorScheme == GeometryObject::COLOR_IN_SITU)
376376
{
377377
Vector colorVector = inputVector.normal();
378-
node_color = ColorRGB(colorVector.x(), colorVector.y(), colorVector.z());
378+
node_color = ColorRGB(std::abs(colorVector.x()), std::abs(colorVector.y()), std::abs(colorVector.z()));
379379
}
380380
}
381381
switch (state.mGlyphType)
@@ -490,7 +490,7 @@ void ShowFieldGlyphs::renderScalars(
490490
double v;
491491
fld->get_value(v, node.index());
492492
Point p = node.point();
493-
double radius = v * scale;
493+
double radius = std::abs(v) * scale;
494494

495495
if (colorScheme != GeometryObject::COLOR_UNIFORM)
496496
{
@@ -502,7 +502,7 @@ void ShowFieldGlyphs::renderScalars(
502502
if (colorScheme == GeometryObject::COLOR_IN_SITU)
503503
{
504504
Vector colorVector = Vector(p.x(), p.y(), p.z()).normal();
505-
node_color = ColorRGB(colorVector.x(), colorVector.y(), colorVector.z());
505+
node_color = ColorRGB(std::abs(colorVector.x()), std::abs(colorVector.y()), std::abs(colorVector.z()));
506506
}
507507
}
508508
switch (state.mGlyphType)
@@ -538,7 +538,7 @@ void ShowFieldGlyphs::renderScalars(
538538
double v;
539539
fld->get_value(v, cell.index());
540540
Point p = cell.center();
541-
double radius = v * scale;
541+
double radius = std::abs(v) * scale;
542542

543543
if (colorScheme != GeometryObject::COLOR_UNIFORM)
544544
{
@@ -550,7 +550,7 @@ void ShowFieldGlyphs::renderScalars(
550550
if (colorScheme == GeometryObject::COLOR_IN_SITU)
551551
{
552552
Vector colorVector = Vector(p.x(), p.y(), p.z()).normal();
553-
node_color = ColorRGB(colorVector.x(), colorVector.y(), colorVector.z());
553+
node_color = ColorRGB(std::abs(colorVector.x()), std::abs(colorVector.y()), std::abs(colorVector.z()));
554554
}
555555
}
556556
switch (state.mGlyphType)
@@ -650,7 +650,7 @@ void ShowFieldGlyphs::renderTensors(
650650
if (colorScheme == GeometryObject::COLOR_IN_SITU)
651651
{
652652
Vector colorVector = t.get_eigenvector1().normal();
653-
node_color = ColorRGB(colorVector.x(), colorVector.y(), colorVector.z());
653+
node_color = ColorRGB(std::abs(colorVector.x()), std::abs(colorVector.y()), std::abs(colorVector.z()));
654654
}
655655
}
656656
switch (state.mGlyphType)
@@ -689,7 +689,7 @@ void ShowFieldGlyphs::renderTensors(
689689
if (colorScheme == GeometryObject::COLOR_IN_SITU)
690690
{
691691
Vector colorVector = t.get_eigenvector1().normal();
692-
node_color = ColorRGB(colorVector.x(), colorVector.y(), colorVector.z());
692+
node_color = ColorRGB(std::abs(colorVector.x()), std::abs(colorVector.y()), std::abs(colorVector.z()));
693693
}
694694
}
695695
switch (state.mGlyphType)

0 commit comments

Comments
 (0)