Esempio n. 1
0
        public static Matrix ModelMatrixFun(RotationMatrix rotationMatrix, Matrix transMatrix, Matrix scaleMatrix)
        {
            var modelMatrix = Matrix.Multiply(transMatrix, scaleMatrix);

            modelMatrix = Matrix.Multiply(modelMatrix, rotationMatrix.X);
            modelMatrix = Matrix.Multiply(modelMatrix, rotationMatrix.Y);
            modelMatrix = Matrix.Multiply(modelMatrix, rotationMatrix.Z);
            return(modelMatrix);
        }
Esempio n. 2
0
        public Cillinder(int angle)
        {
            RotationMatrix rotationMatrix = new RotationMatrix(angle);
            Matrix         scaleMatrix    = Utils.ScalingMatrix(new Point3D(1, 1, 1));


            Matrix transMatrixObject = Utils.TranslationMatrix(new Point3D(1, 1, 1));

            ModelObject = Utils.ModelMatrixFun(rotationMatrix, transMatrixObject, scaleMatrix);
            ProjMatrix  = projectionMatrix();
        }