com.jme3.math
クラス Transform

java.lang.Object
  上位を拡張 com.jme3.math.Transform
すべての実装されたインタフェース:
Savable, java.io.Serializable, java.lang.Cloneable

public final class Transform
extends java.lang.Object
implements Savable, java.lang.Cloneable, java.io.Serializable

Started Date: Jul 16, 2004

Represents a translation, rotation and scale in one object.

関連項目:
直列化された形式

フィールドの概要
static Transform IDENTITY
           
 
コンストラクタの概要
Transform()
           
Transform(Quaternion rot)
           
Transform(Vector3f translation)
           
Transform(Vector3f translation, Quaternion rot)
           
 
メソッドの概要
 Transform clone()
           
 Transform combineWithParent(Transform parent)
          Changes the values of this matrix acording to it's parent.
 Quaternion getRotation()
          Return the rotation quaternion in this matrix.
 Quaternion getRotation(Quaternion quat)
          Stores this rotation value into the given Quaternion.
 Vector3f getScale()
          Return the scale vector in this matrix.
 Vector3f getScale(Vector3f scale)
          Stores this scale value into the given vector3f.
 Vector3f getTranslation()
          Return the translation vector in this matrix.
 Vector3f getTranslation(Vector3f trans)
          Stores this translation value into the given vector3f.
 void interpolateTransforms(Transform t1, Transform t2, float delta)
          Sets this matrix to the interpolation between the first matrix and the second by delta amount.
 void loadIdentity()
          Loads the identity.
 void read(JmeImporter e)
           
 Transform set(Transform matrixQuat)
          Sets this matrix to be equal to the given matrix.
 Transform setRotation(Quaternion rot)
          Sets this rotation to the given Quaternion value.
 Transform setScale(float scale)
          Sets this scale to the given value.
 Transform setScale(float x, float y, float z)
          Sets this matrix's scale to the given x,y,z values.
 Transform setScale(Vector3f scale)
          Sets this scale to the given value.
 Transform setTranslation(float x, float y, float z)
          Sets this matrix's translation to the given x,y,z values.
 Transform setTranslation(Vector3f trans)
          Sets this translation to the given value.
 java.lang.String toString()
           
 Vector3f transformInverseVector(Vector3f in, Vector3f store)
           
 Vector3f transformVector(Vector3f in, Vector3f store)
           
 void write(JmeExporter e)
           
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

IDENTITY

public static final Transform IDENTITY
コンストラクタの詳細

Transform

public Transform(Vector3f translation,
                 Quaternion rot)

Transform

public Transform(Vector3f translation)

Transform

public Transform(Quaternion rot)

Transform

public Transform()
メソッドの詳細

setRotation

public Transform setRotation(Quaternion rot)
Sets this rotation to the given Quaternion value.

パラメータ:
rot - The new rotation for this matrix.
戻り値:
this

setTranslation

public Transform setTranslation(Vector3f trans)
Sets this translation to the given value.

パラメータ:
trans - The new translation for this matrix.
戻り値:
this

getTranslation

public Vector3f getTranslation()
Return the translation vector in this matrix.

戻り値:
translation vector.

setScale

public Transform setScale(Vector3f scale)
Sets this scale to the given value.

パラメータ:
scale - The new scale for this matrix.
戻り値:
this

setScale

public Transform setScale(float scale)
Sets this scale to the given value.

パラメータ:
scale - The new scale for this matrix.
戻り値:
this

getScale

public Vector3f getScale()
Return the scale vector in this matrix.

戻り値:
scale vector.

getTranslation

public Vector3f getTranslation(Vector3f trans)
Stores this translation value into the given vector3f. If trans is null, a new vector3f is created to hold the value. The value, once stored, is returned.

パラメータ:
trans - The store location for this matrix's translation.
戻り値:
The value of this matrix's translation.

getRotation

public Quaternion getRotation(Quaternion quat)
Stores this rotation value into the given Quaternion. If quat is null, a new Quaternion is created to hold the value. The value, once stored, is returned.

パラメータ:
quat - The store location for this matrix's rotation.
戻り値:
The value of this matrix's rotation.

getRotation

public Quaternion getRotation()
Return the rotation quaternion in this matrix.

戻り値:
rotation quaternion.

getScale

public Vector3f getScale(Vector3f scale)
Stores this scale value into the given vector3f. If scale is null, a new vector3f is created to hold the value. The value, once stored, is returned.

パラメータ:
scale - The store location for this matrix's scale.
戻り値:
The value of this matrix's scale.

interpolateTransforms

public void interpolateTransforms(Transform t1,
                                  Transform t2,
                                  float delta)
Sets this matrix to the interpolation between the first matrix and the second by delta amount.

パラメータ:
t1 - The begining transform.
t2 - The ending transform.
delta - An amount between 0 and 1 representing how far to interpolate from t1 to t2.

combineWithParent

public Transform combineWithParent(Transform parent)
Changes the values of this matrix acording to it's parent. Very similar to the concept of Node/Spatial transforms.

パラメータ:
parent - The parent matrix.
戻り値:
This matrix, after combining.

setTranslation

public Transform setTranslation(float x,
                                float y,
                                float z)
Sets this matrix's translation to the given x,y,z values.

パラメータ:
x - This matrix's new x translation.
y - This matrix's new y translation.
z - This matrix's new z translation.
戻り値:
this

setScale

public Transform setScale(float x,
                          float y,
                          float z)
Sets this matrix's scale to the given x,y,z values.

パラメータ:
x - This matrix's new x scale.
y - This matrix's new y scale.
z - This matrix's new z scale.
戻り値:
this

transformVector

public Vector3f transformVector(Vector3f in,
                                Vector3f store)

transformInverseVector

public Vector3f transformInverseVector(Vector3f in,
                                       Vector3f store)

loadIdentity

public void loadIdentity()
Loads the identity. Equal to translation=1,1,1 scale=0,0,0 rot=0,0,0,1.


toString

public java.lang.String toString()
オーバーライド:
クラス java.lang.Object 内の toString

set

public Transform set(Transform matrixQuat)
Sets this matrix to be equal to the given matrix.

パラメータ:
matrixQuat - The matrix to be equal to.
戻り値:
this

write

public void write(JmeExporter e)
           throws java.io.IOException
定義:
インタフェース Savable 内の write
例外:
java.io.IOException

read

public void read(JmeImporter e)
          throws java.io.IOException
定義:
インタフェース Savable 内の read
例外:
java.io.IOException

clone

public Transform clone()
オーバーライド:
クラス java.lang.Object 内の clone