Page 1 of 1

Interactive 3D rotation

Posted: Tue Feb 21, 2012 2:22 pm
by 17461591
Anyone who knows the easy way to rig interactive rotation of TeeChart's 3D axis system (and hence the entire chart box follows the rotation).
From the examples, tutorials and docs I have not been able, with my limited brain capacity, to stumble over the easy way to do this in TeeChart.
Thanks!

Re: Interactive 3D rotation

Posted: Tue Feb 21, 2012 3:33 pm
by yeray
Hi Stein Erik,

I think you could be looking for the Rotation tool. Please, take a look at the demo at "All Features\Welcome!\Tools\Rotate".
Is this the behaviour you are looking for? If not, please try to reexplain it with some more detail.

Re: Interactive 3D rotation

Posted: Tue Feb 21, 2012 4:24 pm
by 17461591
Hi Stein Erik, I think you could be looking for the Rotation tool. Please, take a look at the demo at "All Features\Welcome!\Tools\Rotate". Is this the behaviour you are looking for? If not, please try to reexplain it with some more detail.
Thanks Yeray,
Hmm, the example did not fulfill my dream though, maybe I am using the mouse the wrong way or the Mac is performing differently than Windows?

When the Active button is checked, I am able to pan the Surface around interactively by clicking the right mouse key and simultaneously move the mouse around. The axes values shifts according to the movement. But I am not able to rotate the Surface nor the entire "chart box" (the latter being my primary goal). Btw; neither left-clicking the mouse or using the mid-mouse button gave any action. I have also tried to combine the mouse actions with the Shift, Ctrl & Alt keys.

When the Active button is unchecked, I can still obtain the same performance as described above. In addition the left-mouse button can be used to make a rectangle to zoom-unzoom the surface. (I also learned the unzoom trick; left mouse button + up-and-left movement)

Re: Interactive 3D rotation

Posted: Tue Feb 21, 2012 6:53 pm
by 17461591
Additional info:
I tested the Tools/Rotate in the online demo at http://www.steema.com/teechart/java. That one worked beautifully :wink: Left-clicking the mouse + mouse movement rotated the entire chart "box". Just what I am looking for! This was on a Mac OSX Lion within Firefox.

But I do not experience the same rotation performance with the downloaded Examples (v 3.2012.0202); Tools/RotateDemo.java
This is also on the Mac OSX Lion. I am using the Java SWT version. Other mouse related actions seems to work though (e.g. panning of a Surface). DonĀ“t know if this is specifically related to the Mac, or if a little improvement is generally needed.

Re: Interactive 3D rotation

Posted: Wed Feb 22, 2012 10:36 am
by yeray
Hi Stein Erik,

Excuse me, you are right. The rotation tool seems to be broken in this release for SWT (it works fine in Swing). I've fixed it for the next maintenance release (TJ71016050).

As you are a source code customer, you could apply the fix in your copy. In Rotate.java, at the line 299 you read:

Code: Select all

if (e.getID() == FrameworkMouseEvent.MOUSE_DRAGGED) {
Change it for this:

Code: Select all

if ((e.getID() == FrameworkMouseEvent.MOUSE_DRAGGED) || (e.getID() == FrameworkMouseEvent.MOUSE_MOVED)) {

Re: Interactive 3D rotation

Posted: Wed Feb 22, 2012 1:44 pm
by 17461591
Thanks!

Re: Interactive 3D rotation

Posted: Wed Feb 22, 2012 3:11 pm
by yeray
You're welcome! :D