Opened 7 years ago
Last modified 2 years ago
#4834 new defect
JS Vector2D should use XZ instead of XY
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Backlog |
Component: | UI – Miscellaneous | Keywords: | |
Cc: | Patch: |
Description
In the engine we use Y
for the elevation and X
and Z
for the horizonal plane.
r9096 introduced the Vector
JS object which uses X
and Y
. This is now in globalscripts/
and used in not few places. In many if not all places, the Y
represents Z
.
So it would be much more clear if it would use X
and Z
.
rP9271 made some effort going into the same direction.
There is also a Vector2D.h
class that also uses Y
with the same issue in most if not all simulation uses.
Perhaps we could have VectorXY
and VectorXZ
that inherit the same class.
Change History (4)
comment:1 by , 7 years ago
comment:2 by , 6 years ago
As far as I can see that's a good idea. Though you would also have to change the C++ 2D-Vector (CFixedVector2D) because we sometimes convert between the JS and the C++ ones.
comment:3 by , 5 years ago
Component: | UI & Simulation → Misc. UI |
---|
Move tickets to their correct component as "UI & Simulation" got some sub components.
comment:4 by , 2 years ago
Vector2D might be still useful for real 2D math, so I'd prefer to have a different class (might be inherited) with a proper naming, like VectorXZ, VectorHorizontal2D or VectorH2D.
In 20388: