// Token: 0x060019B5 RID: 6581 RVA: 0x000E8881 File Offset: 0x000E6A81
 public static void amVectorCopy(NNS_VECTOR4D pDst, ref SNNS_VECTOR4D pSrc)
 {
     pDst.x = pSrc.x;
     pDst.y = pSrc.y;
     pDst.z = pSrc.z;
     pDst.w = pSrc.w;
 }
 // Token: 0x060019AF RID: 6575 RVA: 0x000E8794 File Offset: 0x000E6994
 public static void amVectorSet(out SNNS_VECTOR4D pDst, float x, float y, float z)
 {
     pDst.x = x;
     pDst.y = y;
     pDst.z = z;
     pDst.w = 1f;
 }
 // Token: 0x060019A9 RID: 6569 RVA: 0x000E86D1 File Offset: 0x000E68D1
 public static void amVectorOne(ref SNNS_VECTOR4D pVec)
 {
     pVec.x = 1f;
     pVec.y = 1f;
     pVec.z = 1f;
     pVec.w = 1f;
 }
 // Token: 0x060019A7 RID: 6567 RVA: 0x000E8675 File Offset: 0x000E6875
 public static void amVectorInit(ref SNNS_VECTOR4D pVec)
 {
     pVec.x = 0f;
     pVec.y = 0f;
     pVec.z = 0f;
     pVec.w = 1f;
 }
 // Token: 0x060019BF RID: 6591 RVA: 0x000E8B3C File Offset: 0x000E6D3C
 public static void amVectorAdd(NNS_VECTOR4D pDst, ref SNNS_VECTOR4D pV1, NNS_VECTOR4D pV2)
 {
     pDst.x = pV1.x + pV2.x;
     pDst.y = pV1.y + pV2.y;
     pDst.z = pV1.z + pV2.z;
     pDst.w = pV1.w;
 }
Пример #6
0
    // Token: 0x06000F66 RID: 3942 RVA: 0x000883D8 File Offset: 0x000865D8
    public static void amQuatMultiVector(ref SNNS_VECTOR4D pDst, ref SNNS_VECTOR4D pSrc, ref NNS_QUATERNION pQuat, NNS_VECTOR4D pVec)
    {
        NNS_QUATERNION nns_QUATERNION  = default(NNS_QUATERNION);
        NNS_QUATERNION nns_QUATERNION2 = default(NNS_QUATERNION);
        NNS_QUATERNION nns_QUATERNION3 = default(NNS_QUATERNION);
        NNS_QUATERNION nns_QUATERNION4 = default(NNS_QUATERNION);

        AppMain.VEC4_COPY(ref nns_QUATERNION4, ref pSrc);
        nns_QUATERNION2.x = -pQuat.x;
        nns_QUATERNION2.y = -pQuat.y;
        nns_QUATERNION2.z = -pQuat.z;
        nns_QUATERNION2.w = pQuat.w;
        AppMain.nnMultiplyQuaternion(ref nns_QUATERNION3, ref pQuat, ref nns_QUATERNION4);
        AppMain.nnMultiplyQuaternion(ref nns_QUATERNION, ref nns_QUATERNION3, ref nns_QUATERNION2);
        if (pVec == null)
        {
            AppMain.VEC4_COPY(ref pDst, ref nns_QUATERNION);
            return;
        }
        SNNS_VECTOR4D snns_VECTOR4D  = default(SNNS_VECTOR4D);
        SNNS_VECTOR4D snns_VECTOR4D2 = default(SNNS_VECTOR4D);

        AppMain.VEC4_COPY(ref snns_VECTOR4D, ref nns_QUATERNION);
        AppMain.VEC4_COPY(ref snns_VECTOR4D2, pVec);
        AppMain.amVectorAdd(ref pDst, ref snns_VECTOR4D, ref snns_VECTOR4D2);
    }
Пример #7
0
 // Token: 0x06001E88 RID: 7816 RVA: 0x0013A95B File Offset: 0x00138B5B
 public NNS_VECTOR Assign(ref SNNS_VECTOR4D vec)
 {
     this.x = vec.x;
     this.y = vec.y;
     this.z = vec.z;
     return(this);
 }
 // Token: 0x060019E5 RID: 6629 RVA: 0x000E9642 File Offset: 0x000E7842
 public static void amVectorScale(NNS_VECTOR4D pDst, ref SNNS_VECTOR4D pSrc, float sc)
 {
     pDst.x = pSrc.x * sc;
     pDst.y = pSrc.y * sc;
     pDst.z = pSrc.z * sc;
     pDst.w = pSrc.w;
 }
    // Token: 0x06000A70 RID: 2672 RVA: 0x0005C8C0 File Offset: 0x0005AAC0
    public static void amMatrixCalcPoint(ref SNNS_VECTOR4D pDst, ref SNNS_VECTOR4D pSrc)
    {
        NNS_MATRIX mtx = AppMain.amMatrixGetCurrent();

        AppMain.nnTransformVector(ref pDst, mtx, ref pSrc);
        pDst.w = pSrc.w;
    }
 // Token: 0x060019A4 RID: 6564 RVA: 0x000E85F7 File Offset: 0x000E67F7
 public static void VEC4_COPY(ref NNS_QUATERNION d_vec, ref SNNS_VECTOR4D s_vec)
 {
     d_vec.x = s_vec.x;
     d_vec.y = s_vec.y;
     d_vec.z = s_vec.z;
     d_vec.w = s_vec.w;
 }
Пример #11
0
 // Token: 0x06001E93 RID: 7827 RVA: 0x0013AB09 File Offset: 0x00138D09
 public void Assign(ref SNNS_VECTOR4D val)
 {
     this.x = val.x;
     this.y = val.y;
     this.z = val.z;
     this.w = val.w;
 }
 // Token: 0x060019D0 RID: 6608 RVA: 0x000E8FB0 File Offset: 0x000E71B0
 public static void amVectorSub(ref SNNS_VECTOR4D pDst, ref SNNS_VECTOR4D pV1, ref SNNS_VECTOR4D pV2)
 {
     pDst.x = pV1.x - pV2.x;
     pDst.y = pV1.y - pV2.y;
     pDst.z = pV1.z - pV2.z;
     pDst.w = pV1.w;
 }
 // Token: 0x060019A0 RID: 6560 RVA: 0x000E8530 File Offset: 0x000E6730
 public static void VEC4_COPY(ref SNNS_VECTOR4D d_vec, NNS_VECTOR4D s_vec)
 {
     d_vec.x = s_vec.x;
     d_vec.y = s_vec.y;
     d_vec.z = s_vec.z;
     d_vec.w = s_vec.w;
 }
Пример #14
0
    // Token: 0x06000F61 RID: 3937 RVA: 0x000881B4 File Offset: 0x000863B4
    public static void amQuatMultiMatrix(ref NNS_QUATERNION pQuat, ref SNNS_VECTOR4D pVec)
    {
        NNS_MATRIX nns_MATRIX = AppMain.amMatrixGetCurrent();

        AppMain.nnMakeQuaternionMatrix(out AppMain.tempSNNS_MATRIX0, ref pQuat);
        AppMain.nnCopyVectorMatrixTranslation(ref AppMain.tempSNNS_MATRIX0, ref pVec);
        AppMain.nnMultiplyMatrix(nns_MATRIX, nns_MATRIX, ref AppMain.tempSNNS_MATRIX0);
    }
    // Token: 0x060019ED RID: 6637 RVA: 0x000E98D4 File Offset: 0x000E7AD4
    public static float amVectorUnit(ref SNNS_VECTOR4D pDst)
    {
        float num = AppMain.amSqrt(AppMain.amPow2(pDst.x) + AppMain.amPow2(pDst.y) + AppMain.amPow2(pDst.z));

        if (!AppMain.amIsZerof(num))
        {
            float num2 = 1f / num;
            pDst.x *= num2;
            pDst.y *= num2;
            pDst.z *= num2;
        }
        return(num);
    }
    // Token: 0x060019E1 RID: 6625 RVA: 0x000E94EC File Offset: 0x000E76EC
    public static float amVectorScaleUnit(ref SNNS_VECTOR4D pDst, ref SNNS_VECTOR4D pSrc, float len)
    {
        float num = AppMain.amSqrt(AppMain.amPow2(pSrc.x) + AppMain.amPow2(pSrc.y) + AppMain.amPow2(pSrc.z));

        AppMain.amVectorCopy(ref pDst, ref pSrc);
        if (!AppMain.amIsZerof(num))
        {
            len    /= num;
            pDst.x *= len;
            pDst.y *= len;
            pDst.z *= len;
        }
        return(num);
    }
    // Token: 0x060019E9 RID: 6633 RVA: 0x000E9758 File Offset: 0x000E7958
    public static float amVectorUnit(NNS_VECTOR pDst, ref SNNS_VECTOR4D pSrc)
    {
        float num = AppMain.amSqrt(AppMain.amPow2(pSrc.x) + AppMain.amPow2(pSrc.y) + AppMain.amPow2(pSrc.z));

        AppMain.nnCopyVector(pDst, ref pSrc);
        if (!AppMain.amIsZerof(num))
        {
            float num2 = 1f / num;
            pDst.x *= num2;
            pDst.y *= num2;
            pDst.z *= num2;
        }
        return(num);
    }
    // Token: 0x06000A76 RID: 2678 RVA: 0x0005C980 File Offset: 0x0005AB80
    public static void amMatrixCalcVector(ref SNNS_VECTOR4D pDst, NNS_VECTOR4D pSrc)
    {
        NNS_MATRIX mtx = AppMain.amMatrixGetCurrent();

        AppMain.nnTransformNormalVector(ref pDst, mtx, pSrc);
    }
 // Token: 0x06001A09 RID: 6665 RVA: 0x000EA18B File Offset: 0x000E838B
 public static void amVectorRandom(ref SNNS_VECTOR4D pDst)
 {
     AppMain.amVectorSet(out pDst, AppMain.nnRandom() - 0.5f, AppMain.nnRandom() - 0.5f, AppMain.nnRandom() - 0.5f);
     AppMain.amVectorUnit(ref pDst);
 }
 // Token: 0x060019F4 RID: 6644 RVA: 0x000E9A84 File Offset: 0x000E7C84
 public static void amVectorOuterProduct(NNS_VECTOR4D pDst, ref SNNS_VECTOR4D pV1, ref SNNS_VECTOR4D pV2)
 {
     AppMain.amVectorSet(pDst, pV1.y * pV2.z - pV1.z * pV2.y, pV1.z * pV2.x - pV1.x * pV2.z, pV1.x * pV2.y - pV1.y * pV2.x);
 }
 // Token: 0x060019DE RID: 6622 RVA: 0x000E9408 File Offset: 0x000E7608
 public static float amVectorScalor(ref SNNS_VECTOR4D pVec)
 {
     return(AppMain.amSqrt(AppMain.amPow2(pVec.x) + AppMain.amPow2(pVec.y) + AppMain.amPow2(pVec.z)));
 }
 // Token: 0x060019CA RID: 6602 RVA: 0x000E8E0C File Offset: 0x000E700C
 public static void amVectorAdd(NNS_VECTOR4D pDst, ref SNNS_VECTOR4D pSrc)
 {
     pDst.x += pSrc.x;
     pDst.y += pSrc.y;
     pDst.z += pSrc.z;
 }