mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2496 Tensor vectors: Two new paletts
This commit is contained in:
@@ -338,19 +338,19 @@ cvf::ref<cvf::Part> RivTensorResultPartMgr::createPart(const std::vector<TensorV
|
||||
|
||||
cvf::ref<cvf::ScalarMapperDiscreteLinear> discreteScalarMapper = new cvf::ScalarMapperDiscreteLinear;
|
||||
auto vectorColors = m_rimReservoirView->tensorResults()->vectorColors();
|
||||
if (vectorColors == RimTensorResults::MAGENTA_BROWN_BLACK || vectorColors == RimTensorResults::WHITE_GRAY_BLACK)
|
||||
{
|
||||
activeScalerMapper = discreteScalarMapper.p();
|
||||
|
||||
createOneColorPerPrincipalScalarMapper(vectorColors, discreteScalarMapper.p());
|
||||
createOneColorPerPrincipalTextureCoords(lineTexCoords.p(), tensorVisualizations, discreteScalarMapper.p());
|
||||
}
|
||||
else
|
||||
if (vectorColors == RimTensorResults::RESULT_COLORS)
|
||||
{
|
||||
activeScalerMapper = m_rimReservoirView->tensorResults()->legendConfig()->scalarMapper();
|
||||
|
||||
createResultColorTextureCoords(lineTexCoords.p(), tensorVisualizations, activeScalerMapper);
|
||||
}
|
||||
else
|
||||
{
|
||||
activeScalerMapper = discreteScalarMapper.p();
|
||||
|
||||
createOneColorPerPrincipalScalarMapper(vectorColors, discreteScalarMapper.p());
|
||||
createOneColorPerPrincipalTextureCoords(lineTexCoords.p(), tensorVisualizations, discreteScalarMapper.p());
|
||||
}
|
||||
|
||||
caf::ScalarMapperEffectGenerator surfEffGen(activeScalerMapper, caf::PO_1);
|
||||
|
||||
@@ -381,14 +381,19 @@ void RivTensorResultPartMgr::createOneColorPerPrincipalScalarMapper(const RimTen
|
||||
|
||||
cvf::Color3ubArray arrowColors;
|
||||
arrowColors.resize(3);
|
||||
if (colorSet == RimTensorResults::MAGENTA_BROWN_BLACK)
|
||||
{
|
||||
arrowColors = RiaColorTables::tensorMagentaBrownBlackPaletteColors().color3ubArray();
|
||||
}
|
||||
else if (colorSet == RimTensorResults::WHITE_GRAY_BLACK)
|
||||
|
||||
if (colorSet == RimTensorResults::WHITE_GRAY_BLACK)
|
||||
{
|
||||
arrowColors = RiaColorTables::tensorWhiteGrayBlackPaletteColors().color3ubArray();
|
||||
}
|
||||
else if (colorSet == RimTensorResults::ORANGE_BLUE_WHITE)
|
||||
{
|
||||
arrowColors = RiaColorTables::tensorOrangeBlueWhitePaletteColors().color3ubArray();
|
||||
}
|
||||
else if (colorSet == RimTensorResults::MAGENTA_BROWN_GRAY)
|
||||
{
|
||||
arrowColors = RiaColorTables::tensorsMagentaBrownGrayPaletteColors().color3ubArray();
|
||||
}
|
||||
|
||||
scalarMapper->setColors(arrowColors);
|
||||
scalarMapper->setRange(0.5, 3.5);
|
||||
|
||||
Reference in New Issue
Block a user