Commit c480edf2 authored by Tobias Neeb's avatar Tobias Neeb
Browse files

[FIX 736] correctly map to scalarValues of the scene

parent ab1ab4b4
......@@ -79,7 +79,7 @@ void WTransferFunction2D::sample2DTransferFunction( unsigned char*array, int wid
{
for( int y = yMin; y < yMax; ++y )
{
if( isPointInTriangle( w.points, PolyPoint( x, y ) ) )
if( isPointInTriangle( w.points, PolyPoint( x * 300.0 / width, y * 300.0 / height ) ) )
{
for( int j = 0; j < 3; ++j )
{
......
......@@ -441,7 +441,9 @@ private:
*/
bool operator==( const TriangleEntry &rhs ) const
{
return isoX == rhs.isoX && isoY == rhs.isoY && color == rhs.color;
return isoX == rhs.isoX && isoY == rhs.isoY && color == rhs.color && ( points[0].x
== rhs.points[0].x ) && ( points[0].y == rhs.points[0].y ) && ( rhs.points[1].x == points[1].x )
&& points[1].y == rhs.points[1].y && points[2].x == rhs.points[2].x && points[2].y == rhs.points[2].y;
}
/** the points of the triangle */
PolyPoint points[3];
......
......@@ -110,7 +110,7 @@ void WPropertyTransferFunction2DWidget::update()
m_transferFunction.insertBoxWidgetNormalized( QPointF( isoX, isoY ), width, height, &c );
}
size_t ntWidgets = tf.numTriangleWidgets();
for( size_t i = 0; i < ntWidgets; i++ )
for( size_t i = 0; i < ntWidgets; ++i )
{
c = toQColor( tf.getColor( TRIANGLE, i ) );
double isoX = tf.getIsovalueX( TRIANGLE, i );
......
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