Commit 2fa0484b authored by Tobias Neeb's avatar Tobias Neeb
Browse files

[STYLE 759] conform to coding style for changes of ticket 759

parent b2263cbb
......@@ -164,26 +164,26 @@ namespace PROPERTY_TYPE_HELPER
string_utils::fromString< double >( innerTokens[ 8 ].c_str() ) ) // Alpha
);
}
if( innerTokens[ 9 ] == "d")
if( innerTokens[ 9 ] == "d" )
{
WTransferFunction2D::PolyPoint points[3];
points[0].x = string_utils::fromString<double>(innerTokens[18].c_str());
points[0].y = string_utils::fromString<double>(innerTokens[19].c_str());
points[1].x = string_utils::fromString<double>(innerTokens[20].c_str());
points[1].y = string_utils::fromString<double>(innerTokens[21].c_str());
points[2].x = string_utils::fromString<double>(innerTokens[22].c_str());
points[2].y = string_utils::fromString<double>(innerTokens[23].c_str());
points[0].x = string_utils::fromString<double>( innerTokens[18].c_str() );
points[0].y = string_utils::fromString<double>( innerTokens[19].c_str() );
points[1].x = string_utils::fromString<double>( innerTokens[20].c_str() );
points[1].y = string_utils::fromString<double>( innerTokens[21].c_str() );
points[2].x = string_utils::fromString<double>( innerTokens[22].c_str() );
points[2].y = string_utils::fromString<double>( innerTokens[23].c_str() );
tf.addTriangleWidget(
points,
string_utils::fromString<double>(innerTokens[10].c_str()), // isoX
string_utils::fromString<double>(innerTokens[11].c_str()), // isoY
string_utils::fromString<double>(innerTokens[12].c_str()), // width
string_utils::fromString<double>(innerTokens[13].c_str()),
string_utils::fromString<double>( innerTokens[10].c_str() ), // isoX
string_utils::fromString<double>( innerTokens[11].c_str() ), // isoY
string_utils::fromString<double>( innerTokens[12].c_str() ), // width
string_utils::fromString<double>( innerTokens[13].c_str() ),
WColor(
string_utils::fromString<double>(innerTokens[14].c_str()), // Red
string_utils::fromString<double>(innerTokens[15].c_str()), // Green
string_utils::fromString<double>(innerTokens[16].c_str()), // Blue
string_utils::fromString<double>(innerTokens[17].c_str())) // Alpha
string_utils::fromString<double>( innerTokens[14].c_str() ), // Red
string_utils::fromString<double>( innerTokens[15].c_str() ), // Green
string_utils::fromString<double>( innerTokens[16].c_str() ), // Blue
string_utils::fromString<double>( innerTokens[17].c_str() ) ) // Alpha
);
}
idx++;
......@@ -208,13 +208,13 @@ namespace PROPERTY_TYPE_HELPER
<< c[ 0 ] << ":" << c[ 1 ] << ":" << c[ 2 ] << ":" << c[ 3 ];
}
size_t ntWidgets = tf.numTriangleWidgets();
for (size_t i = 0; i < ntWidgets; i++)
for( size_t i = 0; i < ntWidgets; i++ )
{
WColor c = tf.getColor(TRIANGLE, i);
double isoX = tf.getIsovalueX(TRIANGLE, i);
double isoY = tf.getIsovalueY(TRIANGLE, i);
double width = tf.getWidth(TRIANGLE, i);
double height = tf.getHeight(TRIANGLE, i);
WColor c = tf.getColor( TRIANGLE, i );
double isoX = tf.getIsovalueX( TRIANGLE, i );
double isoY = tf.getIsovalueY( TRIANGLE, i );
double width = tf.getWidth( TRIANGLE, i );
double height = tf.getHeight( TRIANGLE, i );
std::vector<WTransferFunction2D::PolyPoint> points = tf.getPoints( i );
out << "d:" << isoX << ":" << isoY << ":" << width << ":" << height << ":"
<< c[0] << ":" << c[1] << ":" << c[2] << ":" << c[3] << ":" << points[0].x << ":" << points[0].y << ":"
......
......@@ -222,7 +222,6 @@ public:
*/
double getWidth( Shapes shape, size_t i ) const
{
switch( shape )
{
case BOX:
......@@ -245,7 +244,6 @@ public:
*/
double getHeight( Shapes shape, size_t i ) const
{
switch( shape )
{
case BOX:
......@@ -284,7 +282,6 @@ public:
*/
WColor getColor( Shapes shape, size_t i ) const
{
switch( shape )
{
case BOX:
......@@ -294,7 +291,7 @@ public:
return m_triangle_widgets.at( i ).color;
break;
default:
return WColor(0.0, 255.0, 0.0, 10.0);
return WColor( 0.0, 255.0, 0.0, 10.0 );
break;
}
}
......
......@@ -112,16 +112,16 @@ void WPropertyTransferFunction2DWidget::update()
size_t ntWidgets = tf.numTriangleWidgets();
for( size_t i = 0; i < ntWidgets; i++ )
{
c = toQColor(tf.getColor(TRIANGLE, i));
c = toQColor( tf.getColor( TRIANGLE, i ) );
double isoX = tf.getIsovalueX( TRIANGLE, i );
double isoY = tf.getIsovalueY( TRIANGLE, i );
QPointF points[3];
points[0].setX( tf.getPoints( i )[0].x);
points[0].setY( tf.getPoints( i )[0].y);
points[1].setX( tf.getPoints( i )[1].x);
points[1].setY( tf.getPoints( i )[1].y);
points[2].setX( tf.getPoints( i )[2].x);
points[2].setY( tf.getPoints( i )[2].y);
points[0].setX( tf.getPoints( i )[0].x );
points[0].setY( tf.getPoints( i )[0].y );
points[1].setX( tf.getPoints( i )[1].x );
points[1].setY( tf.getPoints( i )[1].y );
points[2].setX( tf.getPoints( i )[2].x );
points[2].setY( tf.getPoints( i )[2].y );
m_transferFunction.insertTriangleWidgetNormalized( points, QPointF( isoX, isoY ), &c );
}
}
......
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