#2965 Implement option (on by default) to follow time step in 3D view.

This commit is contained in:
Gaute Lindkvist
2018-06-20 10:31:03 +02:00
parent 5fc795a24a
commit a0f5db5d7e
8 changed files with 125 additions and 33 deletions

View File

@@ -135,6 +135,37 @@ bool Rim3dWellLogCurve::isShowingCurve() const
return m_showCurve;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dWellLogCurve::curveValuesAndMdsAtTimeStep(std::vector<double>* values, std::vector<double>* measuredDepthValues, int timeStep) const
{
return this->curveValuesAndMds(values, measuredDepthValues);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::pair<double, double> Rim3dWellLogCurve::findCurveValueRange()
{
double foundMinValue = std::numeric_limits<float>::infinity();
double foundMaxValue = -std::numeric_limits<float>::infinity();
std::vector<double> values;
std::vector<double> measuredDepths;
this->curveValuesAndMds(&values, &measuredDepths);
for (double value : values)
{
if (RiaCurveDataTools::isValidValue(value, false))
{
foundMinValue = std::min(foundMinValue, value);
foundMaxValue = std::max(foundMaxValue, value);
}
}
return std::make_pair(foundMinValue, foundMaxValue);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -261,22 +292,10 @@ cvf::ref<Riv3dWellLogCurveGeometryGenerator> Rim3dWellLogCurve::geometryGenerato
//--------------------------------------------------------------------------------------------------
void Rim3dWellLogCurve::resetMinMaxValues()
{
std::vector<double> values;
std::vector<double> measuredDepths;
this->curveValuesAndMds(&values, &measuredDepths);
double foundMinValue = std::numeric_limits<float>::infinity();
double foundMaxValue = -std::numeric_limits<float>::infinity();
for (double value : values)
{
if (RiaCurveDataTools::isValidValue(value, false))
{
foundMinValue = std::min(foundMinValue, value);
foundMaxValue = std::max(foundMaxValue, value);
}
}
std::pair<double, double> valueRange = findCurveValueRange();
m_minCurveDataValue = foundMinValue;
m_maxCurveDataValue = foundMaxValue;
m_minCurveDataValue = valueRange.first;
m_maxCurveDataValue = valueRange.second;
m_minCurveUIValue = m_minCurveDataValue;
m_maxCurveUIValue = m_maxCurveDataValue;