LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.common
Class Ly4DMatrix

java.lang.Object
  extended by leon.view.common.Ly4DMatrix

public class Ly4DMatrix
extends java.lang.Object

This class defines a 4x4 matrix.


Field Summary
static java.lang.String __VERSION
           
 float _ww
          ww value.
 float _wx
          wx value.
 float _wy
          wy value.
 float _wz
          wz value.
 float _xw
          xw value.
 float _xx
          xx value.
 float _xy
          xy value.
 float _xz
          xz value.
 float _yw
          yw value.
 float _yx
          yx value.
 float _yy
          yy value.
 float _yz
          yz value.
 float _zw
          zw value.
 float _zx
          zx value.
 float _zy
          zy value.
 float _zz
          zz value.
 
Constructor Summary
Ly4DMatrix()
          Constructor.
Ly4DMatrix(float xx, float xy, float xz, float xw, float yx, float yy, float yz, float yw, float zx, float zy, float zz, float zw, float wx, float wy, float wz, float ww)
          Constructor.
 
Method Summary
 void add(Ly4DMatrix matrix)
          Add the current matrix by the given matrix (this + matrix).
 Ly4DMatrix getMultiplicationBy(Ly4DMatrix matrix)
          Returns the result of matrix multiplication (this*matrix).
 LyPoint getMultiplicationBy(LyPoint point)
          Returns the result of matrix multiplication for the given 3D point.
 Ly4DMatrix getTransponize()
          Returns the transponized matrix.
 void init()
          Init method.
 void multiply(Ly4DMatrix matrix)
          Multiply the current matrix by the given matrix (this*matrix).
 void rotateX(double alpha)
          Rotate alpha radians about the x axis.
 void rotateY(double alpha)
          Rotate alpha radians about the y axis.
 void rotateZ(double alpha)
          Rotate alpha radians about the z axis.
 void setValues(float xx, float xy, float xz, float xw, float yx, float yy, float yz, float yw, float zx, float zy, float zz, float zw, float wx, float wy, float wz, float ww)
          Sets the values of the matrix.
 java.lang.String toString()
          Returns a string representation of the matrix.
 void translate(float tx, float ty, float tz)
          Translate the origin of the matrix.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

_xx

public float _xx
xx value.


_xy

public float _xy
xy value.


_xz

public float _xz
xz value.


_xw

public float _xw
xw value.


_yx

public float _yx
yx value.


_yy

public float _yy
yy value.


_yz

public float _yz
yz value.


_yw

public float _yw
yw value.


_zx

public float _zx
zx value.


_zy

public float _zy
zy value.


_zz

public float _zz
zz value.


_zw

public float _zw
zw value.


_wx

public float _wx
wx value.


_wy

public float _wy
wy value.


_wz

public float _wz
wz value.


_ww

public float _ww
ww value.

Constructor Detail

Ly4DMatrix

public Ly4DMatrix()
Constructor.


Ly4DMatrix

public Ly4DMatrix(float xx,
                  float xy,
                  float xz,
                  float xw,
                  float yx,
                  float yy,
                  float yz,
                  float yw,
                  float zx,
                  float zy,
                  float zz,
                  float zw,
                  float wx,
                  float wy,
                  float wz,
                  float ww)
Constructor.

Parameters:
xx - xx value
xy - xy value
xz - xz value
xw - xw value
yx - yx value
yy - yy value
yz - yz value
yw - yw value
zx - zx value
zy - zy value
zz - zz value
zw - zw value
wx - wx value
wy - wy value
wz - wz value
ww - ww value
Method Detail

init

public void init()
Init method.


translate

public void translate(float tx,
                      float ty,
                      float tz)
Translate the origin of the matrix.

Parameters:
tx - translation in x
ty - translation in y
tz - translation in z

getMultiplicationBy

public LyPoint getMultiplicationBy(LyPoint point)
Returns the result of matrix multiplication for the given 3D point.

Parameters:
point - the point to transform.
Returns:
the result of the multiplication.

multiply

public void multiply(Ly4DMatrix matrix)
Multiply the current matrix by the given matrix (this*matrix).

Parameters:
matrix - the matrix to multiply by.

add

public void add(Ly4DMatrix matrix)
Add the current matrix by the given matrix (this + matrix).

Parameters:
matrix - the matrix to add.

getMultiplicationBy

public Ly4DMatrix getMultiplicationBy(Ly4DMatrix matrix)
Returns the result of matrix multiplication (this*matrix).

Parameters:
matrix - the matrix to multiply by.
Returns:
the result of the multiplication.

getTransponize

public Ly4DMatrix getTransponize()
Returns the transponized matrix.

Returns:
the result of the transponization.

rotateX

public void rotateX(double alpha)
Rotate alpha radians about the x axis.

Parameters:
alpha - the rotation angle in radians

rotateY

public void rotateY(double alpha)
Rotate alpha radians about the y axis.

Parameters:
alpha - the rotation angle in radians

rotateZ

public void rotateZ(double alpha)
Rotate alpha radians about the z axis.

Parameters:
alpha - the rotation angle in radians

toString

public java.lang.String toString()
Returns a string representation of the matrix.

Overrides:
toString in class java.lang.Object

setValues

public void setValues(float xx,
                      float xy,
                      float xz,
                      float xw,
                      float yx,
                      float yy,
                      float yz,
                      float yw,
                      float zx,
                      float zy,
                      float zz,
                      float zw,
                      float wx,
                      float wy,
                      float wz,
                      float ww)
Sets the values of the matrix.

Parameters:
xx - xx value
xy - xy value
xz - xz value
xw - xw value
yx - yx value
yy - yy value
yz - yz value
yw - yw value
zx - zx value
zy - zy value
zz - zz value
zw - zw value
wx - wx value
wy - wy value
wz - wz value
ww - ww value

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com