Commit d4495612 authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[ADD #453] function that can return a WValue with double type for a

wvalueset.with any type.
parent 69618fd6
......@@ -176,6 +176,15 @@ public:
return static_cast< double >( m_data[i] );
}
/**
* \param i id of the WValue to retrieve
* \return The i-th WValue stored in this value set. There are size() such scalars.
*/
virtual wmath::WValue< double > getWValueDouble( size_t i ) const
{
return wmath::WValue< double >( getWValue( i ) );
}
/**
* Get the i'th vector
*
......
......@@ -30,6 +30,7 @@
#include <boost/variant.hpp>
#include "../common/math/WValue.h"
#include "WDataHandlerEnums.h"
#include "WExportDataHandler.h"
......@@ -86,6 +87,12 @@ public:
*/
virtual double getScalarDouble( size_t i ) const = 0;
/**
* \param i id of the WValue to retrieve
* \return The i-th WValue stored in this value set. There are size() such scalars.
*/
virtual wmath::WValue< double > getWValueDouble( size_t i ) const = 0;
/**
* \return Dimension of the values in this ValueSet
*/
......
......@@ -92,6 +92,14 @@ public:
return 255;
}
/**
* \return The i-th WValue stored in this value set. There are size() such scalars.
*/
virtual wmath::WValue< double > getWValueDouble( size_t /*i*/ ) const
{
return wmath::WValue< double >( size() );
}
/**
* This method returns the smallest value in the valueset. It does not handle vectors, matrices and so on well. It simply returns the
* smallest value in the data array. This is especially useful for texture scaling or other statistic tools (histograms).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment