[vtkusers] (no subject)

Roger Crawfis crawfis at cis.ohio-state.edu
Thu Apr 24 12:48:46 EDT 2003


 

Does anyone know how to get semi-transparent lines? The vtkProperty works
when setting the color of my streamlines, but not the geometry. Giving the
same property pointer to other geometry makes it transparent. No effect on
the streamlines though. A bug? Also, if I add the SpeedScalarsOn or the
OrientationScalarsOn, the streamlines disappear. Note, there is a mismatch
on the grid size and the velocity magnitude, hence the very large
propagation time.

 

Roger

--------code snippit-------------

  vtkStreamLine *streamLine;

  vtkPolyDataMapper *streamMapper;

  vtkActor *streamActor;

  vtkProperty *lineProps = vtkProperty::New();

        lineProps->SetLineWidth( 2.3 );

        lineProps->SetColor( 0.9, 0.9, 0.2 );

        lineProps->SetInterpolationToFlat();

        lineProps->SetOpacity( 0.03 );

      float seedPt[3];

        for( int is=0; is < 1000; is++ )

        {

              seedPt[0] = 0.2;

              seedPt[1] = 32.0 * rand()/(float) RAND_MAX;

              seedPt[2] = 32.0 * rand()/(float) RAND_MAX;

              streamLine = vtkStreamLine::New();

              streamLine->SetInput( sgrid );

              streamLine->SetStartPosition( seedPt );

              //streamLine->OrientationScalarsOn();

              streamLine->SetMaximumPropagationTime( 3000000.0 );

              streamLine->SetIntegrationStepLength( 0.7 );

              streamLine->SetStepLength( 10000.0 );

 

              streamMapper = vtkPolyDataMapper::New();

              streamMapper->SetInput( streamLine->GetOutput() );

 

              streamActor = vtkActor::New();

              streamActor->SetMapper( streamMapper );

              streamActor->SetProperty( lineProps );

              ren1->AddActor( streamActor );

        }

 

 

--------------------------------------

--------------------------------------

Roger A. Crawfis

Associate Professor

Computer & Information Science

The Ohio State University

2015 Neil Ave., Columbus, OH 43210

TEL: (614) 292-2566

FAX: (614) 292-2911

E-Mail: crawfis at cis.ohio-state.edu

http://www.cis.ohio-state.edu/~crawfis

--------------------------------------

--------------------------------------

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030424/d35122c8/attachment.htm>


More information about the vtkusers mailing list