Exemplo n.º 1
0
        /// <summary>
        /// Updates the extents to include the specified extents.
        /// </summary>
        /// <param name="extents">The extents.</param>
        public void Add(Extents3D <T, U, TExtents> extents)
        {
            if (extents.MaxY > MaxY)
            {
                MaxY = extents.MaxY;
            }
            if (extents.MinY < MinY)
            {
                MinY = extents.MinY;
            }

            if (extents.MaxX > MaxX)
            {
                MaxX = extents.MaxX;
            }
            if (extents.MinX < MinX)
            {
                MinX = extents.MinX;
            }

            if (extents.MaxZ > MaxZ)
            {
                MaxZ = extents.MaxZ;
            }
            if (extents.MinZ < MinZ)
            {
                MinZ = extents.MinZ;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Extents3D"/> class.
 /// </summary>
 /// <param name="extents">The extents.</param>
 public Extents3D(Extents3D extents)
 {
     initialize();
     Add(new Point3D(extents.MaxX, extents.MaxY, extents.MaxZ));
     Add(new Point3D(extents.MaxX, extents.MinY, extents.MaxZ));
     Add(new Point3D(extents.MinX, extents.MinY, extents.MaxZ));
     Add(new Point3D(extents.MinX, extents.MaxY, extents.MaxZ));
     Add(new Point3D(extents.MaxX, extents.MaxY, extents.MinZ));
     Add(new Point3D(extents.MaxX, extents.MinY, extents.MinZ));
     Add(new Point3D(extents.MinX, extents.MinY, extents.MinZ));
     Add(new Point3D(extents.MinX, extents.MaxY, extents.MinZ));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Extents3D"/> class.
 /// </summary>
 /// <param name="extents">The extents.</param>
 protected Extents3D(Extents3D <T, U, TExtents> extents)
 {
     initialize();
     Add(extents.Boundary());
 }