[vtkusers] vtkInteractorStyle etc
Charl P. Botha
c.p.botha at ewi.tudelft.nl
Fri Mar 12 18:51:06 EST 2004
Howdy James,
James C. Robinson wrote:
> As with all things, they are simple if you have been presented them clearly.
> The thing, therefore, with Delete() is that it doesn't delete but decrements
> a counter until the counter is to 0 and then it does delete (?). You see, I
That's right. Most VTK objects use reference counting in this way. If
one just keeps mental track of the references (it gets even more
interesting in Python, when every Python binding implicitly adds a new
ref!), things go swimmingly.
> have hitherto used VTK in my application (v3.2 & v4.0) without having to
> explicitly select a vtkInteractorStyle and therefore, if it ain't broke.....
> However, I will obviously have to get at it now to circumvent the problems
> with vtkInteractorObserver. Just to recap, do I have to then recast the
> vtkInteractorObserver to a vtkInteractorStyle get at the methods in
> vtkInteractorStyle?
I might have missed this bit: but why don't you just directly use a
vtkInteractorStyle, seeing that it's a descendent of
vtkInteractorObserver? Also: if you're working with any kind of event
handling, it's a far better idea to make use of the new-style VTK observers.
>
> Finally, do you have any ideas about the whole
> AutoAdjustCameraClippingRangeOff method? I explained in my earlier e-mail
> that the issue is because when it is on automatic the near clipping plane is
> 1% of the total dimension from the camera and in a large scene (say 4000m FE
> mesh) this means that the near clipping plane is 40m from the camera.
You should just be able to call this on your interactorstyle, whether
than's the default style assigned to the RWI or a custom style. (unless
I'm missing something :)
Good luck,
Charl
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
More information about the vtkusers
mailing list