[vtkusers] How renderer->ResetCamera() execute faster for input25000 points as (x, y, z) format in vtkDelaunay3D process

vidyadhar vidyadhar at lucidindia.net
Fri Apr 15 23:32:39 EDT 2005


Hi,
If there is only one actor, you could try using ResetCamera(bnds) where bnds is bounds of data used for actor.
Vidyadhar
  ----- Original Message ----- 
  From: Amit Dhaduk 
  To: vtk 
  Sent: Friday, April 15, 2005 11:22 AM
  Subject: [vtkusers] How renderer->ResetCamera() execute faster for input25000 points as (x, y, z) format in vtkDelaunay3D process


  Hello
    
     I give point cloud data as around 25000 for vtkDelaunay3D and will get output in unstructured grid. When I go for dispaly
  the output as given below code, the execution of  renderer->ResetCamera() takes too much time as more then 2 minutes.

  Anybody know that how can I dispaly my output as faster as my point cloud is bigger for input. One more thing is that my data in point cloud
  are very proper(not any randomly generated) given to generate close outer surface.

  Thanks
  Amit 


  vtkPolyDataMapper *cubeMapper = vtkPolyDataMapper::New();
  cubeMapper->SetInput(OutPut);
  vtkDataSetMapper *pDataset=vtkDataSetMapper::New();
  pDataset->SetInput(dataSet);
  vtkActor *cubeActor = vtkActor::New();
  cubeActor->SetMapper(pDataset);

  vtkCamera *camera = vtkCamera::New();
  camera->SetPosition(1,1,1);
  camera->SetFocalPoint(0,0,0);

  vtkRenderer *renderer = vtkRenderer::New();
  vtkRenderWindow *renWin = vtkRenderWindow::New();
  renWin->AddRenderer(renderer);

  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
  iren->SetRenderWindow(renWin);

  renderer->AddActor(cubeActor);
  renderer->SetActiveCamera(camera);
  renderer->ResetCamera();  -> takes time for execution as more then 2 minutes
  renderer->SetBackground(0,0,0);

  renWin->SetSize(704,576); 

  renWin->Render();
  iren->Start();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050416/fb7c6aef/attachment.htm>


More information about the vtkusers mailing list