예제 #1
0
        public IBoundingBox BoundingBox()
        {
            var          pts = new IVector3[] { Point1, Point2 };
            IBoundingBox ext = BoundingBoxBuilder.FromPtArray(pts);

            return(ext);
        }
예제 #2
0
        public BoundingBox BoundingBox()
        {
            Vector3[]   pts = new Vector3[] { Point1, Point2 };
            BoundingBox ext = BoundingBoxBuilder.FromPtArray(pts);

            return(ext);
        }
예제 #3
0
        public static BoundingBox CubeFromPtArray(List <Vector3> points)
        {
            try
            {
                BoundingBox boundingBox = BoundingBoxBuilder.FromPtArray(points.ToArray());
                Vector3     center      = boundingBox.Center;
                Vector3     width       = boundingBox.Max - boundingBox.Min;
                double      maxDim      = .5 * Math.Max(Math.Abs(width.X), Math.Max(Math.Abs(width.Y), Math.Abs(width.Z)));

                Vector3 size = new Vector3(maxDim, maxDim, maxDim);
                boundingBox = new BoundingBox(center - size, center + size);
                return(boundingBox);
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #4
0
        public static IBoundingBox CubeFromPtArray(List <IVector3> points)
        {
            try
            {
                var    boundingBox = BoundingBoxBuilder.FromPtArray(points.ToArray());
                var    center      = boundingBox.Center;
                var    width       = boundingBox.Max.Minus(boundingBox.Min);
                double maxDim      = .5 * Math.Max(Math.Abs(width.X), Math.Max(Math.Abs(width.Y), Math.Abs(width.Z)));

                var size = new Vector3(maxDim, maxDim, maxDim);
                boundingBox = new BoundingBox(center.Minus(size), center.Plus(size));
                return(boundingBox);
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #5
0
 private BoundingBox getExtents()
 {
     boundingBox = BoundingBoxBuilder.FromPtArray(points.ToArray());
     return(boundingBox);
 }
예제 #6
0
 private void getBoundingBox()
 {
     boundingBox = BoundingBoxBuilder.FromPtArray(vert);
 }