public IBoundingBox BoundingBox() { var pts = new IVector3[] { Point1, Point2 }; IBoundingBox ext = BoundingBoxBuilder.FromPtArray(pts); return(ext); }
public BoundingBox BoundingBox() { Vector3[] pts = new Vector3[] { Point1, Point2 }; BoundingBox ext = BoundingBoxBuilder.FromPtArray(pts); return(ext); }
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; } }
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; } }
private BoundingBox getExtents() { boundingBox = BoundingBoxBuilder.FromPtArray(points.ToArray()); return(boundingBox); }
private void getBoundingBox() { boundingBox = BoundingBoxBuilder.FromPtArray(vert); }