GlobalTransform

Inheritance: java.lang.Object

public class GlobalTransform

Globale Transformation ist ähnlich zu Transform, aber sie ist unveränderlich, während sie die endgültig ausgewertete Transformation darstellt. Das rechtshändige Koordinatensystem wird bei der Auswertung der globalen Transformation verwendet Beispiel: Der folgende Code zeigt, wie man die globale Transformation eines Knotens liest

Scene scene = new Scene();
     var boxNode = scene.getRootNode().createChildNode(new Box());
     //place the box at (10, 0, 0)
     boxNode.getTransform().setTranslation(new Vector3(10, 0, 0));
     var global = boxNode.getGlobalTransform();
     System.out.print("The box's position in world coordinate is %s", global.getTranslation());

Methoden

MethodeBeschreibung
equals(Object arg0)
getClass()
getEulerAngles()Gibt die Rotation in Euler‑Winkeln zurück, gemessen in Grad
getRotation()Gibt die Rotation als Quaternion zurück.
getScale()Gibt die Skalierung zurück
getTransformMatrix()Gibt die Transformationsmatrix zurück.
getTranslation()Gibt die Translation zurück
hashCode()
notify()
notifyAll()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypBeschreibung
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getEulerAngles()

public Vector3 getEulerAngles()

Gibt die Rotation in Euler‑Winkeln zurück, gemessen in Grad

Returns: Vector3 - the rotation represented in Euler angles, measured in degree Example:

Scene scene = Scene.fromFile("test.fbx");
     var tr = scene.getRootNode().getGlobalTransform();
     System.out.printf("EulerAngles = %s", tr.getEulerAngles());

getRotation()

public Quaternion getRotation()

Gibt die Rotation als Quaternion zurück.

Returns: Quaternion - the rotation represented in quaternion. Example:

Scene scene = Scene.fromFile("test.fbx");
     var tr = scene.getRootNode().getGlobalTransform();
     System.out.printf("Rotation = %s", tr.getRotation());

getScale()

public Vector3 getScale()

Gibt die Skalierung zurück

Returns: Vector3 - the scale Example:

Scene scene = Scene.fromFile("test.fbx");
     var tr = scene.getRootNode().getGlobalTransform();
     System.out.printf("Scale = %s", tr.getScale());

getTransformMatrix()

public Matrix4 getTransformMatrix()

Gibt die Transformationsmatrix zurück.

Returns: Matrix4 - the transform matrix. Example:

Scene scene = Scene.fromFile("test.fbx");
     var tr = scene.getRootNode().getGlobalTransform();
     System.out.printf("Matrix = %s", tr.getTransformMatrix());

getTranslation()

public Vector3 getTranslation()

Gibt die Translation zurück

Returns: Vector3 - the translation Example:

Scene scene = Scene.fromFile("test.fbx");
     var tr = scene.getRootNode().getGlobalTransform();
     System.out.printf("Translation = %s", tr.getTranslation());

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypBeschreibung
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypBeschreibung
arg0long
arg1int