예제 #1
0
 public Vertex(double x, double y, double z)
 {
     X           = x;
     Y           = y;
     Z           = z;
     CoordVector = new MatrixVector(x, y, z, 1);
     VNormal     = new Vector(0, 0, 0);
 }
예제 #2
0
        //========================ТРАНСФОРМАЦИЯ МОДЕЛИ===================================

        /// <summary>
        /// Находим координаты для вершины после трансформации
        /// </summary>
        /// <param name="vertexCoord"></param>
        /// <param name="translate"></param>
        /// <param name="scale"></param>
        /// <param name="rotation"></param>
        /// <param name="projectionValue"></param>
        /// <returns></returns>
        private MatrixVector TransformCoordinates(MatrixVector vertexCoord, Vector translate, Vector scale,
                                                  Vector rotation, double projectionValue)
        {
            return(ModelTransform.TransformModel(vertexCoord, ModelTransform.GetScaleMatrix(scale),
                                                 ModelTransform.GetTranslateMatrix(translate), ModelTransform.GetRotationMatrix(rotation), ModelTransform.GetProjectionMatrix(projectionValue)));
        }