?? zmatrix.jad
字號:
// Decompiled by DJ v2.9.9.60 Copyright 2000 Atanas Neshkov Date: 2004-12-12 17:50:39
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: ZMatrix.java
public class ZMatrix
{
static void InitNonchangingValues()
{
fTranslationMatrix[0][0] = 1.0F;
fTranslationMatrix[0][1] = 0.0F;
fTranslationMatrix[0][2] = 0.0F;
fTranslationMatrix[0][3] = 0.0F;
fTranslationMatrix[1][0] = 0.0F;
fTranslationMatrix[1][1] = 1.0F;
fTranslationMatrix[1][2] = 0.0F;
fTranslationMatrix[1][3] = 0.0F;
fTranslationMatrix[2][0] = 0.0F;
fTranslationMatrix[2][1] = 0.0F;
fTranslationMatrix[2][2] = 1.0F;
fTranslationMatrix[2][3] = 0.0F;
fTranslationMatrix[3][3] = 1.0F;
fXRotationMatrix[0][0] = 1.0F;
fXRotationMatrix[0][1] = 0.0F;
fXRotationMatrix[0][2] = 0.0F;
fXRotationMatrix[0][3] = 0.0F;
fXRotationMatrix[1][0] = 0.0F;
fXRotationMatrix[1][3] = 0.0F;
fXRotationMatrix[2][0] = 0.0F;
fXRotationMatrix[2][3] = 0.0F;
fXRotationMatrix[3][0] = 0.0F;
fXRotationMatrix[3][1] = 0.0F;
fXRotationMatrix[3][2] = 0.0F;
fXRotationMatrix[3][3] = 1.0F;
fYRotationMatrix[0][1] = 0.0F;
fYRotationMatrix[0][3] = 0.0F;
fYRotationMatrix[1][0] = 0.0F;
fYRotationMatrix[1][1] = 1.0F;
fYRotationMatrix[1][2] = 0.0F;
fYRotationMatrix[1][3] = 0.0F;
fYRotationMatrix[2][1] = 0.0F;
fYRotationMatrix[2][3] = 0.0F;
fYRotationMatrix[3][0] = 0.0F;
fYRotationMatrix[3][1] = 0.0F;
fYRotationMatrix[3][2] = 0.0F;
fYRotationMatrix[3][3] = 1.0F;
fZRotationMatrix[0][2] = 0.0F;
fZRotationMatrix[0][3] = 0.0F;
fZRotationMatrix[1][2] = 0.0F;
fZRotationMatrix[1][3] = 0.0F;
fZRotationMatrix[2][0] = 0.0F;
fZRotationMatrix[2][1] = 0.0F;
fZRotationMatrix[2][2] = 1.0F;
fZRotationMatrix[2][3] = 0.0F;
fZRotationMatrix[3][0] = 0.0F;
fZRotationMatrix[3][1] = 0.0F;
fZRotationMatrix[3][2] = 0.0F;
fZRotationMatrix[3][3] = 1.0F;
}
public void CopyFrom(ZMatrix zmatrix)
{
fMatrix[0][0] = zmatrix.fMatrix[0][0];
fMatrix[0][1] = zmatrix.fMatrix[0][1];
fMatrix[0][2] = zmatrix.fMatrix[0][2];
fMatrix[0][3] = zmatrix.fMatrix[0][3];
fMatrix[1][0] = zmatrix.fMatrix[1][0];
fMatrix[1][1] = zmatrix.fMatrix[1][1];
fMatrix[1][2] = zmatrix.fMatrix[1][2];
fMatrix[1][3] = zmatrix.fMatrix[1][3];
fMatrix[2][0] = zmatrix.fMatrix[2][0];
fMatrix[2][1] = zmatrix.fMatrix[2][1];
fMatrix[2][2] = zmatrix.fMatrix[2][2];
fMatrix[2][3] = zmatrix.fMatrix[2][3];
fMatrix[3][0] = zmatrix.fMatrix[3][0];
fMatrix[3][1] = zmatrix.fMatrix[3][1];
fMatrix[3][2] = zmatrix.fMatrix[3][2];
fMatrix[3][3] = zmatrix.fMatrix[3][3];
}
public void CopyFrom(float af[][])
{
fMatrix[0][0] = af[0][0];
fMatrix[0][1] = af[0][1];
fMatrix[0][2] = af[0][2];
fMatrix[0][3] = af[0][3];
fMatrix[1][0] = af[1][0];
fMatrix[1][1] = af[1][1];
fMatrix[1][2] = af[1][2];
fMatrix[1][3] = af[1][3];
fMatrix[2][0] = af[2][0];
fMatrix[2][1] = af[2][1];
fMatrix[2][2] = af[2][2];
fMatrix[2][3] = af[2][3];
fMatrix[3][0] = af[3][0];
fMatrix[3][1] = af[3][1];
fMatrix[3][2] = af[3][2];
fMatrix[3][3] = af[3][3];
}
void Translate(int i, int j, int k)
{
fTranslationMatrix[3][0] = i;
fTranslationMatrix[3][1] = j;
fTranslationMatrix[3][2] = k;
float af[][] = Multiply(fTranslationMatrix);
CopyFrom(af);
}
public float[][] Multiply(float af[][])
{
float af1[][] = new float[4][4];
float f = af[0][0];
float f1 = af[1][0];
float f2 = af[2][0];
float f3 = af[0][1];
float f4 = af[1][1];
float f5 = af[2][1];
float f6 = af[0][2];
float f7 = af[1][2];
float f8 = af[2][2];
af1[0][0] = fMatrix[0][0] * f + fMatrix[0][1] * f1 + fMatrix[0][2] * f2;
af1[0][1] = fMatrix[0][0] * f3 + fMatrix[0][1] * f4 + fMatrix[0][2] * f5;
af1[0][2] = fMatrix[0][0] * f6 + fMatrix[0][1] * f7 + fMatrix[0][2] * f8;
af1[0][3] = 0.0F;
af1[1][0] = fMatrix[1][0] * f + fMatrix[1][1] * f1 + fMatrix[1][2] * f2;
af1[1][1] = fMatrix[1][0] * f3 + fMatrix[1][1] * f4 + fMatrix[1][2] * f5;
af1[1][2] = fMatrix[1][0] * f6 + fMatrix[1][1] * f7 + fMatrix[1][2] * f8;
af1[1][3] = 0.0F;
af1[2][0] = fMatrix[2][0] * f + fMatrix[2][1] * f1 + fMatrix[2][2] * f2;
af1[2][1] = fMatrix[2][0] * f3 + fMatrix[2][1] * f4 + fMatrix[2][2] * f5;
af1[2][2] = fMatrix[2][0] * f6 + fMatrix[2][1] * f7 + fMatrix[2][2] * f8;
af1[2][3] = 0.0F;
af1[3][0] = fMatrix[3][0] * f + fMatrix[3][1] * f1 + fMatrix[3][2] * f2 + af[3][0];
af1[3][1] = fMatrix[3][0] * f3 + fMatrix[3][1] * f4 + fMatrix[3][2] * f5 + af[3][1];
af1[3][2] = fMatrix[3][0] * f6 + fMatrix[3][1] * f7 + fMatrix[3][2] * f8 + af[3][2];
af1[3][3] = 1.0F;
af1[0][3] = 0.0F;
af1[1][3] = 0.0F;
af1[2][3] = 0.0F;
af1[3][3] = 1.0F;
return af1;
}
public ZMatrix()
{
fMatrix = new float[4][4];
}
public ZMatrix(int i, int j, int k, int l, int i1, int j1, int k1,
int l1, int i2, int j2, int k2, int l2, int i3, int j3,
int k3, int l3)
{
fMatrix = new float[4][4];
fMatrix[0][0] = i;
fMatrix[0][1] = j;
fMatrix[0][2] = k;
fMatrix[0][3] = l;
fMatrix[1][0] = i1;
fMatrix[1][1] = j1;
fMatrix[1][2] = k1;
fMatrix[1][3] = l1;
fMatrix[2][0] = i2;
fMatrix[2][1] = j2;
fMatrix[2][2] = k2;
fMatrix[2][3] = l2;
fMatrix[3][0] = i3;
fMatrix[3][1] = j3;
fMatrix[3][2] = k3;
fMatrix[3][3] = l3;
}
public void InitTrans()
{
fMatrix[0][0] = 1.0F;
fMatrix[0][1] = 0.0F;
fMatrix[0][2] = 0.0F;
fMatrix[0][3] = 0.0F;
fMatrix[1][0] = 0.0F;
fMatrix[1][1] = 1.0F;
fMatrix[1][2] = 0.0F;
fMatrix[1][3] = 0.0F;
fMatrix[2][0] = 0.0F;
fMatrix[2][1] = 0.0F;
fMatrix[2][2] = 1.0F;
fMatrix[2][3] = 0.0F;
fMatrix[3][0] = 0.0F;
fMatrix[3][1] = 0.0F;
fMatrix[3][2] = 0.0F;
fMatrix[3][3] = 1.0F;
}
void Rotate(int i, int j, int k)
{
if(i != 0 && i != 1920)
{
fXRotationMatrix[1][1] = ZTable.fCos[i];
fXRotationMatrix[1][2] = ZTable.fSin[i];
fXRotationMatrix[2][1] = -ZTable.fSin[i];
fXRotationMatrix[2][2] = ZTable.fCos[i];
float af[][] = Multiply(fXRotationMatrix);
CopyFrom(af);
}
if(j != 0 && j != 1920)
{
fYRotationMatrix[0][0] = ZTable.fCos[j];
fYRotationMatrix[0][2] = -ZTable.fSin[j];
fYRotationMatrix[2][0] = ZTable.fSin[j];
fYRotationMatrix[2][2] = ZTable.fCos[j];
float af1[][] = Multiply(fYRotationMatrix);
CopyFrom(af1);
}
if(k != 0 && k != 1920)
{
fZRotationMatrix[0][0] = ZTable.fCos[k];
fZRotationMatrix[0][1] = ZTable.fSin[k];
fZRotationMatrix[1][0] = -ZTable.fSin[k];
fZRotationMatrix[1][1] = ZTable.fCos[k];
float af2[][] = Multiply(fZRotationMatrix);
CopyFrom(af2);
}
}
static float fScalingMatrix[][] = new float[4][4];
static float fTranslationMatrix[][] = new float[4][4];
static float fXRotationMatrix[][] = new float[4][4];
static float fYRotationMatrix[][] = new float[4][4];
static float fZRotationMatrix[][] = new float[4][4];
float fMatrix[][];
static final int ANGLE_360 = 1920;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -