GlobalTransform
Inheritance: java.lang.Object
public class GlobalTransform
Global transform은 Transform와 유사하지만, 최종 평가된 변환을 나타내는 동안 불변입니다. 전역 변환을 평가할 때 오른손 좌표계가 사용됩니다. Example: 다음 코드는 노드의 전역 변환을 읽는 방법을 보여줍니다.
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());
메서드
| 메서드 | 설명 |
|---|---|
| equals(Object arg0) | |
| getClass() | |
| getEulerAngles() | Euler 각도(도)로 표현된 회전을 가져옵니다. |
| getRotation() | 쿼터니언으로 표현된 회전을 가져옵니다. |
| getScale() | 스케일을 가져옵니다. |
| getTransformMatrix() | 변환 행렬을 가져옵니다. |
| getTranslation() | 이동을 가져옵니다. |
| hashCode() | |
| notify() | |
| notifyAll() | |
| toString() | |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| 매개변수 | 형식 | 설명 |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getEulerAngles()
public Vector3 getEulerAngles()
Euler 각도(도)로 표현된 회전을 가져옵니다.
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()
쿼터니언으로 표현된 회전을 가져옵니다.
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()
스케일을 가져옵니다.
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()
변환 행렬을 가져옵니다.
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()
이동을 가져옵니다.
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:
| 매개변수 | 형식 | 설명 |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| 매개변수 | 형식 | 설명 |
|---|---|---|
| arg0 | long | |
| arg1 | int |