- volumeColor.setRgbF( r, g, b );
- deltaV = delta;
- i += 4;
- }
- else if ( type == "edge" ) {
- // edge color is set by 3 values r:g:b, where
- // - r,g,b - is rgb color components
- if ( i+1 >= colors.count() ) break; // format error
- r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
- if ( i+2 >= colors.count() ) break; // format error
- g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
- if ( i+3 >= colors.count() ) break; // format error
- b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
- edgeColor.setRgbF( r, g, b );
- i += 3;
- }
- else if ( type == "node" ) {
- // node color is set by 3 values r:g:b, where
- // - r,g,b - is rgb color components
- if ( i+1 >= colors.count() ) break; // format error
- r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
- if ( i+2 >= colors.count() ) break; // format error
- g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
- if ( i+3 >= colors.count() ) break; // format error
- b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
- nodeColor.setRgbF( r, g, b );
- i += 3;
- }
- else if ( type == "elem0d" ) {
- // 0d element color is set by 3 values r:g:b, where
- // - r,g,b - is rgb color components
- if ( i+1 >= colors.count() ) break; // format error
- r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
- if ( i+2 >= colors.count() ) break; // format error
- g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
- if ( i+3 >= colors.count() ) break; // format error
- b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
- elem0dColor.setRgbF( r, g, b );
- i += 3;
- }
- else if ( type == "ball" ) {
- // ball color is set by 3 values r:g:b, where
- // - r,g,b - is rgb color components
- if ( i+1 >= colors.count() ) break; // format error
- r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
- if ( i+2 >= colors.count() ) break; // format error
- g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
- if ( i+3 >= colors.count() ) break; // format error
- b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
- ballColor.setRgbF( r, g, b );
- i += 3;
- }
- else if ( type == "outline" ) {
- // outline color is set by 3 values r:g:b, where
- // - r,g,b - is rgb color components
- if ( i+1 >= colors.count() ) break; // format error
- r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
- if ( i+2 >= colors.count() ) break; // format error
- g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
- if ( i+3 >= colors.count() ) break; // format error
- b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
- outlineColor.setRgbF( r, g, b );
- i += 3;
- }
- else if ( type == "orientation" ) {
- // orientation color is set by 3 values r:g:b, where
- // - r,g,b - is rgb color components
- if ( i+1 >= colors.count() ) break; // format error
- r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
- if ( i+2 >= colors.count() ) break; // format error
- g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
- if ( i+3 >= colors.count() ) break; // format error
- b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
- orientationColor.setRgbF( r, g, b );
- i += 3;
- }
- }
- // node color
- if ( nodeColor.isValid() )
- aSmeshActor->SetNodeColor( nodeColor.redF(), nodeColor.greenF(), nodeColor.blueF() );
- // edge color
- if ( edgeColor.isValid() )
- aSmeshActor->SetEdgeColor( edgeColor.redF(), edgeColor.greenF(), edgeColor.blueF() );
- // face color
- if ( faceColor.isValid() )
- aSmeshActor->SetSufaceColor( faceColor.redF(), faceColor.greenF(), faceColor.blueF(), deltaF );
- // volume color
- if ( volumeColor.isValid() )
- aSmeshActor->SetVolumeColor( volumeColor.redF(), volumeColor.greenF(), volumeColor.blueF(), deltaV );
- else if ( faceColor.isValid() ) // backward compatibility (no separate color for volumes)
- aSmeshActor->SetVolumeColor( faceColor.redF(), faceColor.greenF(), faceColor.blueF(), deltaF );
- // 0d element color
- if ( elem0dColor.isValid() )
- aSmeshActor->Set0DColor( elem0dColor.redF(), elem0dColor.greenF(), elem0dColor.blueF() );
- // ball color
- if ( ballColor.isValid() )
- aSmeshActor->SetBallColor( ballColor.redF(), ballColor.greenF(), ballColor.blueF() );
- // outline color
- if ( outlineColor.isValid() )
- aSmeshActor->SetOutlineColor( outlineColor.redF(), outlineColor.greenF(), outlineColor.blueF() );
- // orientation color
- if ( orientationColor.isValid() )
- aSmeshActor->SetFacesOrientationColor( orientationColor.redF(), orientationColor.greenF(), orientationColor.blueF() );
+ volumeColor.setRgbF( r, g, b );
+ deltaV = delta;
+ i += 4;
+ }
+ else if ( type == "edge" ) {
+ // edge color is set by 3 values r:g:b, where
+ // - r,g,b - is rgb color components
+ if ( i+1 >= colors.count() ) break; // format error
+ r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+ if ( i+2 >= colors.count() ) break; // format error
+ g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+ if ( i+3 >= colors.count() ) break; // format error
+ b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+ edgeColor.setRgbF( r, g, b );
+ i += 3;
+ }
+ else if ( type == "node" ) {
+ // node color is set by 3 values r:g:b, where
+ // - r,g,b - is rgb color components
+ if ( i+1 >= colors.count() ) break; // format error
+ r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+ if ( i+2 >= colors.count() ) break; // format error
+ g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+ if ( i+3 >= colors.count() ) break; // format error
+ b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+ nodeColor.setRgbF( r, g, b );
+ i += 3;
+ }
+ else if ( type == "elem0d" ) {
+ // 0d element color is set by 3 values r:g:b, where
+ // - r,g,b - is rgb color components
+ if ( i+1 >= colors.count() ) break; // format error
+ r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+ if ( i+2 >= colors.count() ) break; // format error
+ g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+ if ( i+3 >= colors.count() ) break; // format error
+ b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+ elem0dColor.setRgbF( r, g, b );
+ i += 3;
+ }
+ else if ( type == "ball" ) {
+ // ball color is set by 3 values r:g:b, where
+ // - r,g,b - is rgb color components
+ if ( i+1 >= colors.count() ) break; // format error
+ r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+ if ( i+2 >= colors.count() ) break; // format error
+ g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+ if ( i+3 >= colors.count() ) break; // format error
+ b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+ ballColor.setRgbF( r, g, b );
+ i += 3;
+ }
+ else if ( type == "outline" ) {
+ // outline color is set by 3 values r:g:b, where
+ // - r,g,b - is rgb color components
+ if ( i+1 >= colors.count() ) break; // format error
+ r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+ if ( i+2 >= colors.count() ) break; // format error
+ g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+ if ( i+3 >= colors.count() ) break; // format error
+ b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+ outlineColor.setRgbF( r, g, b );
+ i += 3;
+ }
+ else if ( type == "orientation" ) {
+ // orientation color is set by 3 values r:g:b, where
+ // - r,g,b - is rgb color components
+ if ( i+1 >= colors.count() ) break; // format error
+ r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+ if ( i+2 >= colors.count() ) break; // format error
+ g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+ if ( i+3 >= colors.count() ) break; // format error
+ b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+ orientationColor.setRgbF( r, g, b );
+ i += 3;
+ }
+ }
+ // node color
+ if ( nodeColor.isValid() )
+ aSmeshActor->SetNodeColor( nodeColor.redF(), nodeColor.greenF(), nodeColor.blueF() );
+ // edge color
+ if ( edgeColor.isValid() )
+ aSmeshActor->SetEdgeColor( edgeColor.redF(), edgeColor.greenF(), edgeColor.blueF() );
+ // face color
+ if ( faceColor.isValid() )
+ aSmeshActor->SetSufaceColor( faceColor.redF(), faceColor.greenF(), faceColor.blueF(), deltaF );
+ // volume color
+ if ( volumeColor.isValid() )
+ aSmeshActor->SetVolumeColor( volumeColor.redF(), volumeColor.greenF(), volumeColor.blueF(), deltaV );
+ else if ( faceColor.isValid() ) // backward compatibility (no separate color for volumes)
+ aSmeshActor->SetVolumeColor( faceColor.redF(), faceColor.greenF(), faceColor.blueF(), deltaF );
+ // 0d element color
+ if ( elem0dColor.isValid() )
+ aSmeshActor->Set0DColor( elem0dColor.redF(), elem0dColor.greenF(), elem0dColor.blueF() );
+ // ball color
+ if ( ballColor.isValid() )
+ aSmeshActor->SetBallColor( ballColor.redF(), ballColor.greenF(), ballColor.blueF() );
+ // outline color
+ if ( outlineColor.isValid() )
+ aSmeshActor->SetOutlineColor( outlineColor.redF(), outlineColor.greenF(), outlineColor.blueF() );
+ // orientation color
+ if ( orientationColor.isValid() )
+ aSmeshActor->SetFacesOrientationColor( orientationColor.redF(), orientationColor.greenF(), orientationColor.blueF() );