You are right, but do you think could be possible to add also a direction vector in calcAngle in order to have a 360 degree angle evaluation?
What I actually need is to get a space orientation in the 3D world of an object. This is needed to have a correct rapresentation of a map view when moving in all direction of the surrounding elements.
As an example, image to have a space game where a ship can move in any direction, How do you represent a radar view of enemy ships? imagine that you could be upside down or on one side while moving in space.
-- Update --
Actually, would be interesting, and I believe usefull, to have an extended class of the SimpleVector witch take into account also the direction vector.
-- Update2 --
After the suggestion of EgonOlsen and the description on how does it work, I found out a possible work around, but I will need to work on it to make it in one step.
What I do is the following:
SimpleVector V1=plane.getTransformedCenter();
SimpleVector V2=cam.getDirection();
V1.y=0;
V2.y=0;
float Angi= (float) (Math.atan2(V1.normalize().z,V1.normalize().x)-Math.atan2(V2.normalize().z,V2.normalize().x));
This should work for me. Do you think it is ok? The radar view is just a "top view" of the area and surrounding elements are displayed smaller if at a lower altitude or bigger if higher.
Anyway both of you gave me already a good hint to start on.
Thanks a lot,
Ulrick