FileDocCategorySizeDatePackage
Transform6.javaAPI DocphoneME MR2 API (J2ME)4261Wed May 02 18:00:36 BST 2007com.sun.pisces

Transform6

public class Transform6 extends Transform4

Fields Summary
public int
m02
public int
m12
Constructors Summary
public Transform6()

        this(1 << 16, 0, 0, 1 << 16, 0, 0);
    
public Transform6(int m00, int m01, int m10, int m11, int m02, int m12)

        super(m00, m01, m10, m11);
        
        initialize();
        
        this.m02 = m02;
        this.m12 = m12;
    
public Transform6(Transform6 t)

        this(t.m00, t.m01, t.m10, t.m11, t.m02, t.m12);
    
Methods Summary
private native voidinitialize()

public com.sun.pisces.Transform6inverse()

//         long lm00 = (long)m00;
//         long lm01 = (long)m01;
//         long lm02 = (long)m02;
//         long lm10 = (long)m10;
//         long lm11 = (long)m11;
//         long lm12 = (long)m12;
//         long det = lm00*lm11 - lm01*lm10;

//         int a00 = (int)((lm11 << 32)/det);
//         int a01 = (int)(-(lm01 << 32)/det);
//         int a10 = (int)(-(lm10 << 32)/det);
//         int a11 = (int)((lm00 << 32)/det);
//         int a02 = (int)(((lm01*lm12 - lm02*lm11) << 8)/det) << 8;
//         int a12 = (int)(((lm02*lm10 - lm00*lm12) << 8)/det) << 8;

        float fm00 = m00/65536.0f;
        float fm01 = m01/65536.0f;
        float fm02 = m02/65536.0f;
        float fm10 = m10/65536.0f;
        float fm11 = m11/65536.0f;
        float fm12 = m12/65536.0f;
        float fdet = fm00*fm11 - fm01*fm10;

        float fa00 =  fm11/fdet;
        float fa01 = -fm01/fdet;
        float fa10 = -fm10/fdet;
        float fa11 =  fm00/fdet;
        float fa02 = (fm01*fm12 - fm02*fm11)/fdet;
        float fa12 = (fm02*fm10 - fm00*fm12)/fdet;

	int a00 = (int)(fa00*65536.0);
	int a01 = (int)(fa01*65536.0f);
	int a10 = (int)(fa10*65536.0f);
	int a11 = (int)(fa11*65536.0f);
	int a02 = (int)(fa02*65536.0f);
	int a12 = (int)(fa12*65536.0f);

        return new Transform6(a00, a01, a10, a11, a02, a12);
    
public booleanisIdentity()

        return (m00 == 1 << 16 && m01 == 0 &&
                m10 == 0       && m11 == 1 << 16 &&
                m02 == 0       && m12 == 0);
    
public voidpostMultiply(com.sun.pisces.Transform6 t)

        long _m00 = ((long)m00*t.m00 + (long)m01*t.m10) >> 16;
        long _m01 = ((long)m00*t.m01 + (long)m01*t.m11) >> 16;
        long _m10 = ((long)m10*t.m00 + (long)m11*t.m10) >> 16;
        long _m11 = ((long)m10*t.m01 + (long)m11*t.m11) >> 16;
        long _m02 = (((long)m02 << 16) +
                     (long)m00*t.m02 + (long)m01*t.m12) >> 16;
        long _m12 = (((long)m12 << 16) +
                     (long)m10*t.m02 + (long)m11*t.m12) >> 16;

        this.m00 = (int)_m00;
        this.m01 = (int)_m01;
        this.m02 = (int)_m02;
        this.m10 = (int)_m10;
        this.m11 = (int)_m11;
        this.m12 = (int)_m12;
    
public java.lang.StringtoString()

        return "Transform6[" + 
            "m00=" + (m00/65536.0) + ", " +
            "m01=" + (m01/65536.0) + ", " +
            "m02=" + (m02/65536.0) + ", " +
            "m10=" + (m10/65536.0) + ", " +
            "m11=" + (m11/65536.0) + ", " +
            "m12=" + (m12/65536.0) + "]";