public MXCIFQuadTreeNodeBranch( BoundingBox bb, int level, object data, int dataCount, MXCIFQuadTreeNode nw, MXCIFQuadTreeNode ne, MXCIFQuadTreeNode sw, MXCIFQuadTreeNode se) : base(bb, level, data, dataCount) { Nw = nw; Ne = ne; Sw = sw; Se = se; }
public static MXCIFQuadTreeNode Navigate( MXCIFQuadTreeNode current, string directions) { if (string.IsNullOrEmpty(directions)) { return(current); } var split = directions.SplitCsv(); for (var i = 0; i < split.Length; i++) { var branch = (MXCIFQuadTreeNodeBranch)current; switch (split[i]) { case "nw": current = branch.Nw; break; case "ne": current = branch.Ne; break; case "sw": current = branch.Sw; break; case "se": current = branch.Se; break; default: throw new ArgumentException("Invalid direction " + split[i]); } } return(current); }
public static MXCIFQuadTreeNodeLeaf NavigateLeaf( MXCIFQuadTreeNode node, string directions) { return((MXCIFQuadTreeNodeLeaf)Navigate(node, directions)); }