Exemplo n.º 1
0
        public WindowedWall(Point3D from, Point3D to, double bottom, double height, Window window) : base(from, to, bottom, height)
        {
            this.ventana = window;
            Point3D dir = (to - from).Normalized;

            ventana.Angle = GlUtils.VectorAngle2D(dir);
            double  dist = (to - from).Norm;
            Point3D d    = dir.Scaled((dist - ventana.Width) / 2);

            izq         = new SolidWall(from, from + d, bottom, height);
            der         = new SolidWall(to - d, to, bottom, height);
            up          = new SolidWall(from + d.Scaled(.9), to - d.Scaled(.9), bottom, windowBase);
            down        = new SolidWall(from + d.Scaled(.9), to - d.Scaled(.9), windowBase + this.ventana.Height, (height - windowBase - ventana.Height));
            izq.after   = to;
            up.after    = to;
            down.after  = to;
            der.before  = from;
            up.before   = from;
            down.before = from;
            Point3D wstart = from + d;

            this.ventana.Location = new Point3D(wstart.X, windowBase, wstart.Z);
            izq.CloseTo(false);
            der.CloseFrom(false);
            up.CloseFrom(false);
            up.CloseTo(false);
            down.CloseFrom(false);
            down.CloseTo(false);
        }
Exemplo n.º 2
0
 public override void CloseTo(bool close)
 {
     base.CloseTo(close);
     muro.CloseTo(close);
 }