LeprovostQuentin / mt4j

Automatically exported from code.google.com/p/mt4j
GNU General Public License v2.0
0 stars 0 forks source link

InputCursor getPosition() Method? #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Some suggestion for enhancement:
a getPosition() Method to get a Vector3D of the Position from a InputCursor.
(At the moment i use pos = new Vector3D(InputCursor.getCurrentEvtPosX() 
,InputCursor.getCurrentEvtPosY()  ) ) which is a bit cumbersome.

Original issue reported on code.google.com by stefan.s...@googlemail.com on 8 Apr 2010 at 2:48

GoogleCodeExporter commented 8 years ago
Initially, I didnt add such a method because of 2 reasons:
- returning a vector3d might indicate that it is a 3D point, although it is 
always 2D
- people might use this method alot, creating many new Vector3d objects which 
is bad
for performance (e.g. garbage collection)

But yea, it would often be useful and makes sense for usability reasons. So, I 
added
getPostion() and getStartPosition() now.

Original comment by sirhc.f...@gmail.com on 9 Apr 2010 at 1:59