[vtkusers] Why does a change to underlying poly-data not effect the graphical representation ? (ignore previous messge !)

Oliver Kania ptw.freiburg at googlemail.com
Fri Jul 25 07:31:17 EDT 2008


Hello !
Sorry for posting one more time, please ignore the previous message:

I have a VTK question that has cost me time
and a lot of hair ;)

I am defining poly data, a mapper and an actor.
Now, when I change the underlying poly-Data, the graphical representation
does not change :

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

vtkPoints* l_pts = vtkPoints::New();

    l_pts->InsertPoint(0,0.0,0.0,-1.0);
    l_pts->InsertPoint(1,0.0,0.0,-1.0);
    l_pts->InsertPoint(2,0.0,0.0,-1.0);
    l_pts->InsertPoint(3,0.0,0.0,-1.0);

    vtkCellArray* l_cells = vtkCellArray::New();

    l_cells->InsertNextCell(4);
    l_cells->InsertCellPoint(0);
    l_cells->InsertCellPoint(1);
    l_cells->InsertCellPoint(2);
    l_cells->InsertCellPoint(3);

    m_polydata->SetPoints(l_pts);
    m_polydata->SetPolys(l_cells);

    CDataSpace* l_space       = l_prop->GetBox().get();
    m_polydata->GetPoints()->SetPoint(0,l_space->x_min,l_space->y_min,-1.0);
    m_polydata->GetPoints()->SetPoint(1,l_space->x_min,l_space->y_max,-1.0);
    m_polydata->GetPoints()->SetPoint(2,l_space->x_max,l_space->y_max,-1.0);
    m_polydata->GetPoints()->SetPoint(3,l_space->x_max,l_space->y_min,-1.0);


    m_polydata->Update();
    m_mapper->Update();

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

The first time I am doing this works, but when i change the points using
getPoint()->setPoint(....)  again, nothing happens.

regards, Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080725/ab6515ab/attachment.htm>


More information about the vtkusers mailing list