Re: Expessive exercises...

The rotation angles:

Left- vs. Right-Handed coordinates are a convention, either are correct, as long as you specify which you are using.

In theory yes, but in science and technology the common convention is to use the right-handed one. I don't think, I have ever seen a left-handed coordinate system used anywhere.

Most of Art of Illusion is using the right-handed too. That covers at least bones and the transform tools but the object orientation coordinates in scene are a mix ! The axis directions are right-handed, but the rotation angles on the scene work backwards.  --> For example calculating object rotations by a script using the equations, that the rest of the world uses (like in my physics experimets) I have to convert the positive radian results to negative degrees to get the orientation right.

I suspect the culprit is either CoordinateSystem or Mat4 or maybe both...  The oddity is related to lines like 135 and 334 in the CoordinateSystem:

Mat4 m = Mat4.yrotation(-yrot).times(Mat4.xrotation(-xrot)).times(Mat4.zrotation(-zrot));

I can not think of any reason, why the angles would need to be set negative. When I change those positive, the angles work the right-handed way, when valuse are typed into the fields, but using any other methods to rotate objects will still produce the backwards values....

This is a contradiction, that has probably caused a lot of unnecessary confusion in the code and it would probably not be that hard to unify the behaviour with the rest of the world but then any scripts and plugins and other tools, that may be using setOrientation(), would need to be checked -- depending on what the real findings there are.  brick

The bones:

The viewing direction at creation time can cause the z-angle to be over 90 or under -90 degrees, which then makes using the limiters and comfortability range impossible. Of course it is also possible, that you end up creating a bone in an angle-lock orientation too, but the orientation at creation time is not the rootcause of the problem.

The solution then of course could be to improve the tools, that handle bones or something in the definition of the coordinates. For starters even marking the handles by colors would help. (I'd introduce xColror, yColor, zColor and dColor (dColor or something of that sort for, radius, distance, length...) as application level static values. They'd be handy in a few other places too.

Edit and edit. -- As usual, elaborationg and rewriting, what I just said & correcting a massive ampunt of typos.

Last edited by peteihis (April 5, 2017, 5:00 am)

...there's more to the picture than meets the eye...