[vtkusers] Method that actor does picking........

heochy heochy at hotmail.com
Fri Nov 28 01:00:08 EST 2003


Hi~
Created Line actor to use vtkPoints and vtkCellArray with code that
follow.
However, this line actor wants to do picking.
How do you do picking?

//code 
m_pPointsAE->InsertPoint (0, 0.0, 0.5, 0.0);
m_pPointsAE->InsertPoint (1, 1.0, 0.5, 0.0);

m_pCellArrayAE->InsertNextCell (2);
m_pCellArrayAE->InsertCellPoint (0);
m_pCellArrayAE->InsertCellPoint (1);
	
m_pPolyDataAE->SetPoints(m_pPointsAE);
m_pPolyDataAE->SetLines (m_pCellArrayAE);

m_pCoordinateAE->SetCoordinateSystemToNormalizedViewport();

m_pPolyDataMapper2DAE->SetInput(m_pPolyDataAE);
m_pPolyDataMapper2DAE->SetTransformCoordinate(m_pCoordinateAE);

m_pActor2DAE->SetMapper(m_pPolyDataMapper2DAE);
m_pRenWinA->AddRenderer(m_pRenA);
m_pRenWinA->SetParentId(hWndA);

m_pRenA->AddActor2D(m_pActor2DA);
m_pRenA->AddActor2D(m_pActor2DAE);

m_pRenWinA->Render();



More information about the vtkusers mailing list