示例#1
0
 public ExtrusionPath()
 {
     for (int i = 0; i < MaxSteps; i++)
     {
         transforms[i] = GLMatrix4D.Identity();
     }
 }
示例#2
0
        public static void ApplyRotToGLMatrix4d(ref GLMatrix4D matrix, Rot rot)
        {
            double  fRotAngle = 0;
            Vector3 vAxis     = new Vector3();

            mvMath.Rot2AxisAngle(ref vAxis, ref fRotAngle, rot);

            matrix.applyRotate((float)(fRotAngle / mvMath.PiOver180), (float)vAxis.x, (float)vAxis.y, (float)vAxis.z);
        }
示例#3
0
        public override void UpdatePath()
        {
            iNumberOfTransforms = iLevelOfDetail;
            int    i;
            double fRatio;

            for (i = 0; i < iNumberOfTransforms; i++)
            {
                fRatio        = (double)i / (double)(iNumberOfTransforms - 1);
                transforms[i] = GLMatrix4D.Identity();
                transforms[i].ApplyTranslation(fRatio * fShear, 0, fRatio - 0.5);
                transforms[i].ApplyScale(1 + fRatio * (fTopSizeX - 1), 1 + fRatio * (fTopSizeY - 1), 1);
                transforms[i].applyRotate(fRatio * (double)iTwist, 0, 0, 1);
            }
        }