[vtkusers] vtkPlaneWidget

James Robinson j.robinson at kepler-systems.com
Thu Sep 16 05:22:07 EDT 2004


Dear All,

 

Many thanks to Goodwin (Lawlor) for his ideas. It is very much along the
lines of what I was thinking. However, the issue is "where" does one do
these operations? The correct place would be as part of the vtkPlaneWidget
itself (ergo my comment "short of writing a new object" - which would be
inherited form vtkPlaneWidget). What I am going to do is write something
into the call back for the widget. If this works I will then consider
writing it into the callback for the 3D axis that I have written (a triad
that rotates to indicate the view orientation - which is linked to camera
events). This would (I think) answer Goodwins's need for the vtkPlaneWidget
handles to resize dynamically (which I would have happen at the same time as
the auto resizing of the plane itself).

 

As an aside, I am delving into the vtk3DWidget code and in SizeHandles I
noticed the following:

 

float vtk3DWidget::SizeHandles(float factor)

{

  int i;

  vtkRenderer *renderer;

 

  if ( !this->ValidPick || !(renderer=this->CurrentRenderer) || 

       !renderer->GetActiveCamera() )

    {

    return (this->HandleSize * factor * this->InitialLength);

    }

 

 

Notice the 2nd logical check is "renderer=this->CurrentRenderer". This is an
assignment and is always true (I think). Is this code correct, or should it
be "renderer == this->CurrentRenderer"????

 

Regards to all,

 

Jim

 

Jim Robinson

*     42 Rivergrove,

         Glanmire,

         Co. Cork,

         Eire

'     +353 21 4822028

         +353 87 2393010

*       jrobinson at eircom.net

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040916/5e03f5ff/attachment.htm>


More information about the vtkusers mailing list