API: getLocation, getPosition

I noticed that there is different names when getting position:

getPosition - lights at least

getLocation - camera at least

getTranslation - com.jme3.math.Transform



Maybe use only one of these (maybe getPosition?), changing API before beta should be a problem?

And same to set* too.

Just an idea.

should = should not :smiley:

One could argue for location and position becoming the same… though it’s probably unlikely to change at this late stage.



…but translation and location are entirely different things in this case.

Because my native language isnt english, I myself think pos and loc are the same :smiley: It could be easily changed using just jmp:s (NB:s) rename (refactoring), but maybe I learn which method is on which class.



“…but translation and location are entirely different things in this case.”

Aa, ok. I thought it is the same too.

I myself think pos and loc are the same It could be easily changed using just jmp:s (NB:s) rename (refactoring), but maybe I learn which method is on which class.


that's not the problem, the problem is all the user code this change would break....
But i agree the naming is inconsistent.
“…but translation and location are entirely different things in this case.”
Aa, ok. I thought it is the same too.


And for the record... the reason it is different is because a location is just a place. A translation transforms a whole space relative to some other space... and it transforms all children underneath it. A child's location is the accumulation of its local translation and all of its parents' translations, scales, and rotations.

We could add setPosition() to camera and then deprecate the other one …