[vtkusers] can't use my polydata after renderer->ResetCamera
Alex Malyushytskyy
alexmalvtk at gmail.com
Mon Sep 17 16:14:28 EDT 2012
Most of the problems you will encounter as a programmer are results of
your bugs.
The code below contains undefined pointer and should generate at least
a warning at compile time.
Read all warnings.
Even if it did not you should use debugger before posting such questions.
double* nc;
double x0=nc[0]/10;
...
Alex
On Sat, Sep 15, 2012 at 1:53 AM, Tasnim <hanene-jeder at hotmail.fr> wrote:
> Good morning,
> I changed the coordinates of the points of the mesh in my
> MouseInteractorStyle Class.As result, the mesh becomes very small, I
> ResetCamera() for my renderer in order to make my mesh visible.But,I could
> not use my mesh after this change. Even , when i try to display a message
> showing the new Point's coordinates, the program crashed just after changing
> coordinates and plan:
>
> int bb=0;
> while(bb<polydata->GetNumberOfPoints())
> {
>
> double* nc;
> double x0=nc[0]/10;
> double x1=nc[1]/10;
> double x2=nc[2]/10;
> polydata->GetPoints()->SetPoint(bb,x0,x1,x2 );
> polydata->GetPoints()->Modified();
> polydata->Modified();
> polydata->Update();
> cout<<"nouveau coourdonnées de "<<bb<<"sont :
> "<<x0<<" "<<x1<<"
> "<<x2<<endl;
> bb++;
> }
> renderer->ResetCamera();
> *//it crashes after reseting camera*
> double* z;
> polydata->GetPoints()->GetPoint(1,z);
>
> cout<<" nouveau coordonnées du point 1 sont : "<<z[0]<<" "<<z[1]<<"
> "<<z[2]<<"\n"<<endl;
>
>
> Any help to resolve this problem please.
>
>
> Thanks,
>
>
> Tasnim
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/can-t-use-my-polydata-after-renderer-ResetCamera-tp5716102.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list