[vtkusers] Build my own polydata ?

Adeline Joliet adeline_joli at hotmail.com
Tue Dec 8 06:53:07 EST 2009


Hello,

I used FrustumSource to build the frustum polydata.

vtkFrustumSource * fs = vtkFrustumSource::New();

vtkPlanes * frustumPlanes = areaPicker->GetFrustum();

fs->SetPlanes(frustumPlanes);

frustumedPolyData = fs->GetOutput();

// display
vtkPolyDataMapper *map2 = vtkPolyDataMapper::New();
map2->SetInput(frustumedPolyData);
  
vtkActor* act2 = vtkActor::New();
act2->SetMapper(map2);

It works, the frustum is displayed but there is kind of wierd problem. when I move the camera sometimes all my others
3D objects (and the frustum) just disappear ... ! 

Regards,
Adeline
  

> Date: Mon, 7 Dec 2009 12:52:38 -0500
> From: daviddoria+vtk at gmail.com
> CC: vtkusers at vtk.org
> Subject: Re: [vtkusers] Build my own polydata ?
> 
> On Mon, Dec 7, 2009 at 12:09 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> > On Mon, Dec 7, 2009 at 10:00 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> >> On Mon, Dec 7, 2009 at 9:45 AM, Adeline Joliet <adeline_joli at hotmail.com> wrote:
> >>> Hello,
> >>>
> >>> Here my question, I'using AreaPicker to get the frustum (getClipPoint)
> >>> created from 4 points.getClipPoint return me the 8 points (8 vertices) that
> >>> define the selected frustum.
> >>>
> >>> Is there any posibilitie to build a polydata from that ? If so, how ?
> >>>
> >>> any help would be appreciable :)
> >
> > Ignore my last email, it will probably be much easier to use the
> > vtkFrustumSource.  It doesn't do exactly what you want (it needs the
> > frustum as a vtkPlanes object, not as eight points) but it's still
> > much better than having to build the polydata from scratch.  You just
> > have to create a vtkPlanes object from your eight points.
> >
> >   David
> > _______________________________________________
> 
> There is a shell of an example here (it doesn't current work/do anything):
> http://www.vtk.org/Wiki/Frustum
> 
> Adeline, if you figure out how to construct a frustum it would be nice
> if you could add it to the example (or at least report back here with
> some short code)
> 
> Thanks,
> 
> David
> _______________________________________________
> 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
 		 	   		  
_________________________________________________________________
Téléchargez Internet Explorer 8 et surfez sans laisser de trace !
http://clk.atdmt.com/FRM/go/182932252/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091208/fe5d5817/attachment.htm>


More information about the vtkusers mailing list