protected override SharpGL.SceneComponent.Rectangle3D InitSourceActiveBounds() { bool initFlag = false; SharpGL.SceneComponent.Rectangle3D rect = new SharpGL.SceneComponent.Rectangle3D(); int i, j, k; for (int gridIndex = 0; gridIndex < this.DimenSize; gridIndex++) { if (this.IsActiveBlock(gridIndex)) { this.InvertIJK(gridIndex, out i, out j, out k); if (!initFlag) { initFlag = true; rect = new SharpGL.SceneComponent.Rectangle3D(PointFLB(i, j, k), PointBRT(i, j, k)); } rect.Union(PointFLT(i, j, k)); rect.Union(PointFRT(i, j, k)); rect.Union(PointBLT(i, j, k)); rect.Union(PointBRT(i, j, k)); rect.Union(PointFLB(i, j, k)); rect.Union(PointFRB(i, j, k)); rect.Union(PointBLB(i, j, k)); rect.Union(PointBRB(i, j, k)); } } return(rect); }
protected override SharpGL.SceneComponent.Rectangle3D InitSourceActiveBounds() { if (this.NodeNum <= 0) { throw new ArgumentException("No nodes found"); } Vertex[] nodes = this.Nodes; SharpGL.SceneComponent.Rectangle3D rect = new SharpGL.SceneComponent.Rectangle3D(nodes[0], nodes[0]); for (int i = 0; i < nodes.Length; i++) { rect.Union(nodes[i]); } return(rect); }
protected override SharpGL.SceneComponent.Rectangle3D InitSourceActiveBounds() { if (positions == null || this.positions.Length <= 0) { throw new ArgumentException("Points has No Value"); } Vertex v = positions[0]; SharpGL.SceneComponent.Rectangle3D rect3d = new SharpGL.SceneComponent.Rectangle3D(v, v); for (int i = 0; i < this.positions.Length; i++) { rect3d.Union(this.positions[i]); } return(rect3d); }