fixed: getQuaternion() now requires a destination quaternion instead of allocate a new one
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user