コード例 #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
ファイル: Triangle.cs プロジェクト: 1907931256/MasterProject
 private void getBoundingBox()
 {
     boundingBox = BoundingBoxBuilder.FromPtArray(vert);
 }