fixed: getQuaternion() now requires a destination quaternion instead of allocate a new one

This commit is contained in:
Cerrato Renaud
2016-09-12 12:40:31 -04:00
parent 4e2f4f4063
commit d4a4941780

View File

@@ -106,12 +106,11 @@ public abstract class OrientationProvider implements SensorEventListener {
}
/**
* @return Returns the current rotation of the device in the quaternion
* format (vector4f)
* Get the current rotation of the device in the quaternion format (vector4f)
*/
public Quaternion getQuaternion() {
public void getQuaternion(Quaternion quaternion) {
synchronized (syncToken) {
return currentOrientationQuaternion.clone();
quaternion.set(currentOrientationQuaternion);
}
}