Home »
Public Forums »
archive »
Re: Adjusting Trackball Radius
Re: Adjusting Trackball Radius [message #55290] |
Thu, 16 August 2007 11:40  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
It may not be the answer you are looking for but take a look at the
"camdemo_examine" example program for my camera object. It sounds like
it does exactly what you're trying to do, and I think you would have a
much easier time adjusting the rotation rate (in degrees per mouse
"step") as a function of zoom than trying to adjust the radius of the
trackball. I in fact do this in the program but am not too happy with
the result. At high zoom levels the rotation rate is a bit low so you
could take what I have done and go from there.
You have a couple of different options. You can opt for the KISS (keep
it simple, stupid) approach and download my older, dlm less version here:
http://www.acoustics.washington.edu/~towler/programs/camera_ _define.zip
It comes with the demo programs and is functionally identical to the
newer camera version but lacks some of the more advanced features that
you would most likely never use.
Or you can get the latest version which requires a few dlms. More
features, but at the cost of greater complexity. It is only compiled
for win32 and solaris and the win32 version has not been compiled for
6.4 (yet).
http://www.acoustics.washington.edu/~towler/RHTgrCamera.html
-Rick
Gaurav wrote:
> Adjusting Trackball Radius:
>
> My query is: Can a mathematical formula be derived to relate the
> Trackball Radius of an object to the extent of the object visible
> through the viewplane_rectangle?
>
> What I am basically doing is to display a spherical object within the
> view which can be zoomed upon by applying viewport transformations
> i.e. varying the values in the viewplane_rectangle property of the
> view. The user is then able to rotate the sphere by clicking and
> dragging the mouse over the sphere. This is where the trackball and
> its radius comes in. Right now I am manually adjusting the values of
> the trackball radius depending upon the values of the
> viewplane_rectangle. But this method is not working right as it is not
> possible to define trackball radii for every conceivable values of the
> viewplane extent. And if the radius is not adjusted properly, the view
> pans too much or too little with respect to the desired extent. Is
> there a mathematical way to relate the two(i.e. the view extent and
> the trackball radius), knowing the extent of the view of the object
> (through viewplane_rectangle keyword) and the size (in pixels) of the
> draw widget that contains the view?
>
> Thanks, in advance.
>
> Gaurav
>
|
|
|
Current Time: Thu Oct 09 07:54:53 PDT 2025
Total time taken to generate the page: 0.40121 seconds