Commit 8653f3c1 by Alexander Wiebel

[FIX] moved template function to header

parent d4f0f97e
......@@ -158,17 +158,6 @@ double WDataSetScalar::interpolate( const wmath::WPosition& pos, bool* success )
return result;
}
template< typename T > T WDataSetScalar::getValueAt( int x, int y, int z )
{
boost::shared_ptr< WValueSet< T > > vs = boost::shared_dynamic_cast< WValueSet< T > >( m_valueSet );
boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_grid );
size_t id = x + y * grid->getNbCoordsX() + z * grid->getNbCoordsX() * grid->getNbCoordsY();
T v = vs->getScalar( id );
return v;
}
double WDataSetScalar::getValueAt( int x, int y, int z )
{
boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_grid );
......
......@@ -129,4 +129,15 @@ private:
double m_minimum; //!< Smallest scalar of data set.
};
template< typename T > T WDataSetScalar::getValueAt( int x, int y, int z )
{
boost::shared_ptr< WValueSet< T > > vs = boost::shared_dynamic_cast< WValueSet< T > >( m_valueSet );
boost::shared_ptr< WGridRegular3D > grid = boost::shared_dynamic_cast< WGridRegular3D >( m_grid );
size_t id = x + y * grid->getNbCoordsX() + z * grid->getNbCoordsX() * grid->getNbCoordsY();
T v = vs->getScalar( id );
return v;
}
#endif // WDATASETSCALAR_H
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