[vtkusers] Build my own polydata ?
Adeline Joliet
adeline_joli at hotmail.com
Thu Dec 10 06:26:28 EST 2009
Hello again :), (sry i sent the prev msg by mistake..)
I find out that the bounds of my generated polydata are wrong...
bounds[0],bounds[2] and bounds[4]
bounds[1],bounds[3] and bounds[5] seems to be correct
that's why maybe there is the werid big when I move the camera...
I will have a look in vtkFrustumSource... but if somebody know why the bounds are not correct it would be helpful
Regards,
Adeline
From: adeline_joli at hotmail.com
To: daviddoria+vtk at gmail.com
Date: Tue, 8 Dec 2009 11:53:07 +0000
CC: vtkusers at vtk.org
Subject: Re: [vtkusers] Build my own polydata ?
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
Vous cherchez l'intégrale des clips de Michael Jackson ? Bing ! Trouvez !
_________________________________________________________________
Windows 7 à 35€ pour les étudiants !
http://www.windows-7-pour-les-etudiants.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091210/6bc70989/attachment.htm>
More information about the vtkusers
mailing list