|
@@ -1371,13 +1371,14 @@ public final class Quaternion implements Savable, Cloneable, java.io.Serializabl
|
|
* a vector indicating the local up direction.
|
|
* a vector indicating the local up direction.
|
|
* (typically {0, 1, 0} in jME.)
|
|
* (typically {0, 1, 0} in jME.)
|
|
*/
|
|
*/
|
|
- public void lookAt(Vector3f direction, Vector3f up) {
|
|
|
|
|
|
+ public Quaternion lookAt(Vector3f direction, Vector3f up) {
|
|
TempVars vars = TempVars.get();
|
|
TempVars vars = TempVars.get();
|
|
vars.vect3.set(direction).normalizeLocal();
|
|
vars.vect3.set(direction).normalizeLocal();
|
|
vars.vect1.set(up).crossLocal(direction).normalizeLocal();
|
|
vars.vect1.set(up).crossLocal(direction).normalizeLocal();
|
|
vars.vect2.set(direction).crossLocal(vars.vect1).normalizeLocal();
|
|
vars.vect2.set(direction).crossLocal(vars.vect1).normalizeLocal();
|
|
fromAxes(vars.vect1, vars.vect2, vars.vect3);
|
|
fromAxes(vars.vect1, vars.vect2, vars.vect3);
|
|
vars.release();
|
|
vars.release();
|
|
|
|
+ return this;
|
|
}
|
|
}
|
|
|
|
|
|
public void write(JmeExporter e) throws IOException {
|
|
public void write(JmeExporter e) throws IOException {
|