[vtkusers] vtkBoxWidget2 get coordinates ?

David Doria daviddoria+vtk at gmail.com
Thu Jan 21 16:49:58 EST 2010


On Thu, Jan 21, 2010 at 8:05 AM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> Most widgets have two have components. One component handles the
> events and the other contains the representation. Look at the
> vtkBoxRepresentation documentation:
>  // Description:
>  // Grab the polydata (including points) that define the box widget. The
>  // polydata consists of 6 quadrilateral faces and 15 points. The first
>  // eight points define the eight corner vertices; the next six define the
>  // -x,+x, -y,+y, -z,+z face points; and the final point (the 15th out of
> 15
>  // points) defines the center of the box. These point values are
> guaranteed
>  // to be up-to-date when either the widget's corresponding
> InteractionEvent
>  // or EndInteractionEvent events are invoked. The user provides the
>  // vtkPolyData and the points and cells are added to it.
>  void GetPolyData(vtkPolyData *pd);
>
>
> On Thu, Jan 21, 2010 at 7:36 AM, David Doria <daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>>
> wrote:
> > On Thu, Jan 21, 2010 at 6:01 AM, Adeline Joliet <
> adeline_joli at hotmail.com>
> > wrote:
> >>
> >> Hello,
> >>
> >> I'm trying to do some stuff with vtkBoxWidget2 (box that I can move in a
> >> 3D space..).
> >> I'm able to create that box, and to move/translate/resize etc... but...
> >> How can I get the coordinate,size, corner coordinate etc.. ?
> >>
> >> I havn't seen any "Get" method in the class reference... What can we do
> >> with that box except to only move it.. ?
> >>
> >>
> >> Regards,
> >> Adeline
> >>
> >
> > Haha, I had the same issue when trying to make the example:
> > http://www.vtk.org/Wiki/VTK/Examples/Widgets/BoxWidget2
> > Anyone know how to do it?
> > Thanks,
> >
> > David
> >
>
>
Got it, thanks Bill.

Adeline, here's a demo:
http://www.vtk.org/Wiki/VTK/Examples/Widgets/BoxWidget2

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100121/c49ff95a/attachment.htm>


More information about the vtkusers mailing list