[vtkusers] Color becomes dark when an object is rotated

newcfd newcfd at yahoo.com
Wed Mar 2 15:09:56 EST 2016


Hi, John,

   thanks a lot. I tried your settings and did not see any change.

    vtkPolyDataAlgorithm * pOutlineFilter( NULL );
    pOutlineFilter = vtkOutlineFilter::New();
    pOutlineFilter->SetInputData( m_DataObject );

    // map it to graphics primitives
    vtkCompositePolyDataMapper * pOutlineMapper =
vtkCompositePolyDataMapper::New();
    pOutlineMapper->SetInputConnection(pOutlineFilter->GetOutputPort());
    pOutlineMapper->ImmediateModeRenderingOn();
    pOutlineMapper->ReleaseDataFlagOn();
    pOutlineMapper->Update();
 
    // create an actor for it
    m_pOutlineActor = vtkActor::New();
    m_pOutlineActor->GetProperty()->SetColor(1,1,1); 
    m_pOutlineActor->GetProperty()->SetRepresentationToWireframe();
    m_pOutlineActor->SetMapper(pOutlineMapper);
        
    m_pOutlineActor->GetProperty()->SetAmbient( 1.0 );
    m_pOutlineActor->GetProperty()->SetDiffuse( 0.0 );
    m_pOutlineActor->GetProperty()->SetSpecular( 0.0 );
    
    m_pRenderer->AddActor(m_pOutlineActor);
    
    m_pRenderer->Render();


   Joe



--
View this message in context: http://vtk.1045678.n5.nabble.com/Color-becomes-dark-when-an-object-is-rotated-90-degree-along-y-axis-tp5736973p5736977.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list