Пример #1
0
 public void  Set(BxBezier5Line3F src)
 {
     for (byte i = 0; i < 6; i++)
     {
         fDt[i].Set(src[i]);
     }
 }
Пример #2
0
        // -------------------------------------------------------

        private void  GetPosDiff(BxCmSeparatePatch_Object patch, uint surfaceNo, out BxBezier3Line3F hPosBez0, out BxBezier6Line3F hPosBez1, out BxBezier6Line3F hPosBez2, out BxBezier3Line3F hPosBez3,
                                 out BxBezier3Line3F vPosBez0, out BxBezier6Line3F vPosBez1, out BxBezier6Line3F vPosBez2, out BxBezier3Line3F vPosBez3, out BxBezier2Line3F hDiffBez0, out BxBezier5Line3F hDiffBez1,
                                 out BxBezier5Line3F hDiffBez2, out BxBezier2Line3F hDiffBez3, out BxBezier2Line3F vDiffBez0, out BxBezier5Line3F vDiffBez1, out BxBezier5Line3F vDiffBez2, out BxBezier2Line3F vDiffBez3)
        {
            GetPosBezierH(patch, surfaceNo, out hPosBez0, out hPosBez1, out hPosBez2, out hPosBez3);
            GetPosBezierV(patch, surfaceNo, out vPosBez0, out vPosBez1, out vPosBez2, out vPosBez3);
            GetDiffBezierH(patch, surfaceNo, out hDiffBez0, out hDiffBez1, out hDiffBez2, out hDiffBez3);
            GetDiffBezierV(patch, surfaceNo, out vDiffBez0, out vDiffBez1, out vDiffBez2, out vDiffBez3);
        }
Пример #3
0
        public BxBezier5Line3F(BxBezier5Line3F a)
        {
            fDt = new BxVec3F[6];

            for (byte i = 0; i < 6; i++)
            {
                fDt[i] = new BxVec3F(a[i]);
            }
        }
Пример #4
0
        private void  FromBezier5(BxBezier5Line3F src, uint surfaceOfs, byte ofsBase, float[] dst)
        {
            uint texelOfs = ( uint )((surfaceOfs * 80 * KNumFloatInVector4) + (ofsBase * KNumFloatInVector4));

            for (byte i = 0; i < 6; i++)
            {
                dst[texelOfs + i * KNumFloatInVector4 + 0] = src[i].X;
                dst[texelOfs + i * KNumFloatInVector4 + 1] = src[i].Y;
                dst[texelOfs + i * KNumFloatInVector4 + 2] = src[i].Z;
            }
        }
Пример #5
0
        // ------

        private void  SetVertexBufferOne(
            BxBezier3Line3F hPosBez0, BxBezier6Line3F hPosBez1, BxBezier6Line3F hPosBez2, BxBezier3Line3F hPosBez3, BxBezier3Line3F vPosBez0, BxBezier6Line3F vPosBez1,
            BxBezier6Line3F vPosBez2, BxBezier3Line3F vPosBez3, BxBezier2Line3F hDiffBez0, BxBezier5Line3F hDiffBez1, BxBezier5Line3F hDiffBez2, BxBezier2Line3F hDiffBez3,
            BxBezier2Line3F vDiffBez0, BxBezier5Line3F vDiffBez1, BxBezier5Line3F vDiffBez2, BxBezier2Line3F vDiffBez3, int tessDenom, uint surfaceNo, VertexInfo[] vertexAry)
        {
            SetVertexBuffer0(hPosBez0, hPosBez1, hDiffBez0, surfaceNo, vertexAry);
            SetVertexBuffer1(hPosBez2, hPosBez3, hDiffBez3, surfaceNo, vertexAry);
            SetVertexBuffer2(hDiffBez1, hDiffBez2, tessDenom, surfaceNo, vertexAry);
            SetVertexBuffer3(vPosBez0, vPosBez1, vDiffBez0, surfaceNo, vertexAry);
            SetVertexBuffer4(vPosBez2, vPosBez3, vDiffBez3, surfaceNo, vertexAry);
            SetVertexBuffer5(vDiffBez1, vDiffBez2, surfaceNo, vertexAry);
        }
Пример #6
0
        // ------

        public BxBezier5Line3F  Diff()
        {
            BxBezier5Line3F diff = new BxBezier5Line3F();

            for (byte i = 0; i < BxVec3F.KNumVec3F; i++)
            {
                for (byte j = 0; j < 6; j++)
                {
                    diff[j][i] = 6.0F * (this[j + 1][i] - this[j][i]);
                }
            }

            return(diff);
        }
Пример #7
0
        private void  SetVertexBuffer5(BxBezier5Line3F vDiffBez1, BxBezier5Line3F vDiffBez2, uint surfaceNo, VertexInfo[] vertexAry)
        {
            uint dstIndex = (surfaceNo * 6) + 5;

            ToVector3(vDiffBez1[0], ref vertexAry[dstIndex].pnt0);
            ToVector3(vDiffBez1[1], ref vertexAry[dstIndex].pnt1);
            ToVector3(vDiffBez1[2], ref vertexAry[dstIndex].pnt2);
            ToVector3(vDiffBez1[3], ref vertexAry[dstIndex].pnt3);
            ToVector3(vDiffBez1[4], ref vertexAry[dstIndex].pnt4);
            ToVector3(vDiffBez1[5], ref vertexAry[dstIndex].pnt5);

            ToVector3(vDiffBez2[0], ref vertexAry[dstIndex].pnt6);
            ToVector3(vDiffBez2[1], ref vertexAry[dstIndex].pnt7);
            ToVector3(vDiffBez2[2], ref vertexAry[dstIndex].pnt8);
            ToVector3(vDiffBez2[3], ref vertexAry[dstIndex].pnt9);
            ToVector3(vDiffBez2[4], ref vertexAry[dstIndex].pnt10);
            ToVector3(vDiffBez2[5], ref vertexAry[dstIndex].pnt11);
        }
Пример #8
0
        // ------

        private void  ConvVtfInfo(BxBezier3Line3F hPosBez0, BxBezier6Line3F hPosBez1, BxBezier6Line3F hPosBez2, BxBezier3Line3F hPosBez3, BxBezier3Line3F vPosBez0, BxBezier6Line3F vPosBez1,
                                  BxBezier6Line3F vPosBez2, BxBezier3Line3F vPosBez3, BxBezier2Line3F hDiffBez0, BxBezier5Line3F hDiffBez1, BxBezier5Line3F hDiffBez2, BxBezier2Line3F hDiffBez3,
                                  BxBezier2Line3F vDiffBez0, BxBezier5Line3F vDiffBez1, BxBezier5Line3F vDiffBez2, BxBezier2Line3F vDiffBez3, uint surfaceOfs, float[] vtfInfo)
        {
            FromBezier3(hPosBez0, surfaceOfs, 0, vtfInfo);
            FromBezier6(hPosBez1, surfaceOfs, 4, vtfInfo);
            FromBezier6(hPosBez2, surfaceOfs, 11, vtfInfo);
            FromBezier3(hPosBez3, surfaceOfs, 18, vtfInfo);

            FromBezier3(vPosBez0, surfaceOfs, 22, vtfInfo);
            FromBezier6(vPosBez1, surfaceOfs, 26, vtfInfo);
            FromBezier6(vPosBez2, surfaceOfs, 33, vtfInfo);
            FromBezier3(vPosBez3, surfaceOfs, 40, vtfInfo);

            FromBezier2(hDiffBez0, surfaceOfs, 44, vtfInfo);
            FromBezier5(hDiffBez1, surfaceOfs, 47, vtfInfo);
            FromBezier5(hDiffBez2, surfaceOfs, 53, vtfInfo);
            FromBezier2(hDiffBez3, surfaceOfs, 59, vtfInfo);

            FromBezier2(vDiffBez0, surfaceOfs, 62, vtfInfo);
            FromBezier5(vDiffBez1, surfaceOfs, 65, vtfInfo);
            FromBezier5(vDiffBez2, surfaceOfs, 71, vtfInfo);
            FromBezier2(vDiffBez3, surfaceOfs, 77, vtfInfo);
        }
Пример #9
0
 private void  GetDiffBezierInner(BxCmSeparatePatch_Object src, uint surfaceNo, byte hvId, byte hvOfs, out BxBezier5Line3F diffBezInner)
 {
     diffBezInner = src[surfaceNo].SurfaceEdge[hvId][hvOfs].Inner.Diff();
 }
Пример #10
0
        private void  GetDiffBezierMain(BxCmSeparatePatch_Object src, uint surfaceNo, byte hvId, out BxBezier2Line3F diffBez0, out BxBezier5Line3F diffBez1, out BxBezier5Line3F diffBez2, out BxBezier2Line3F diffBez3)
        {
            byte hvOfs, crossIdx;

            hvOfs    = 0;
            crossIdx = 0;
            GetDiffBezierOuter(src, surfaceNo, hvId, hvOfs, crossIdx, out diffBez0);
            GetDiffBezierInner(src, surfaceNo, hvId, hvOfs, out diffBez1);

            hvOfs    = 1;
            crossIdx = 6;
            GetDiffBezierOuter(src, surfaceNo, hvId, hvOfs, crossIdx, out diffBez3);
            GetDiffBezierInner(src, surfaceNo, hvId, hvOfs, out diffBez2);
        }
Пример #11
0
 private void  GetDiffBezierV(BxCmSeparatePatch_Object src, uint surfaceNo, out BxBezier2Line3F vDiffBez0, out BxBezier5Line3F vDiffBez1, out BxBezier5Line3F vDiffBez2, out BxBezier2Line3F vDiffBez3)
 {
     GetDiffBezierMain(src, surfaceNo, 1, out vDiffBez0, out vDiffBez1, out vDiffBez2, out vDiffBez3);
 }