AutoStereogramDemo.AutoStereogramBuilder.AddHorizontalPlane C# (CSharp) Метод

AddHorizontalPlane() публичный Метод

public AddHorizontalPlane ( double z, CheckPoint checkPoint = null ) : void
z double
checkPoint CheckPoint
Результат void
        public void AddHorizontalPlane(double z, CheckPoint checkPoint = null)
        {
            double addWidth = GetAdditionalWidth(z), addHeight = GetAdditionalHeight(z);
            AddHorizontalPlane(-addWidth, Width + addWidth, -addHeight, Height + addHeight, z, checkPoint);
        }

Same methods

AutoStereogramBuilder::AddHorizontalPlane ( double x1, double x2, double y1, double y2, double z, CheckPoint checkPoint = null ) : void

Usage Example

Пример #1
0
        private static void CreateObjectsAtTwoSides()
        {
            var asb = new AutoStereogramBuilder(1680, 1050, 3);

            asb.AddHorizontalPlane(2);
            asb.AddHorizontalPlane(1.8, (x, y, z) => (x - asb.Width / 2) * (x - asb.Width / 2) / 0.8 + (y - asb.Height / 2) * (y - asb.Height / 2) / 0.4 <= 1);
            asb.AddHorizontalPlane(asb.Width * 0.35, asb.Width * 0.65, asb.Height * 0.35, asb.Height * 0.65, -0.2);
            asb.AddSphere(asb.Width / 2, asb.Height / 2, -0.25, 0.03);

            asb.GenerateBitmap().Save(GetPathAtAssemblyLocation("output\\twosides.gif"), ImageFormat.Gif);
        }
All Usage Examples Of AutoStereogramDemo.AutoStereogramBuilder::AddHorizontalPlane