Branch

indigo.shared.trees.QuadTree.Branch
See theBranch companion object
final case class Branch[S, T](bounds: BoundingBox, a: QuadTree[S, T], b: QuadTree[S, T], c: QuadTree[S, T], d: QuadTree[S, T])(using x$6: SpatialOps[S]) extends QuadTree[S, T]

Attributes

Companion
object

Members list

Value members

Inherited methods

def !==(other: QuadTree[S, T])(using CanEqual[T, T]): Boolean

Compare two trees for inequality.

Compare two trees for inequality.

Attributes

Inherited from:
QuadTree
def ===(other: QuadTree[S, T])(using CanEqual[T, T]): Boolean

Compare two trees for equality.

Compare two trees for equality.

Attributes

Inherited from:
QuadTree
def filter(p: (QuadTreeValue[S, T]) => Boolean): QuadTree[S, T]

Filter's out any matching value in the tree.

Filter's out any matching value in the tree.

Attributes

Inherited from:
QuadTree
def filterAt(vertex: Vertex, p: (QuadTreeValue[S, T]) => Boolean): QuadTree[S, T]

Filters the values at the quad directly under the vertex, if there is any. Note that while this is fast, it only works well for simple cases, or trees of vertices / points. This is because it does not visit the whole tree looking for other quads that might share ownership of this value. For example, if you add a bounding box the size of the whole tree, but then use filterAt to filter it's value in just one quad, say the top left quad, the box will continue to exist in all the other quads it touched.

Filters the values at the quad directly under the vertex, if there is any. Note that while this is fast, it only works well for simple cases, or trees of vertices / points. This is because it does not visit the whole tree looking for other quads that might share ownership of this value. For example, if you add a bounding box the size of the whole tree, but then use filterAt to filter it's value in just one quad, say the top left quad, the box will continue to exist in all the other quads it touched.

Attributes

Inherited from:
QuadTree
def filterByBoundingBox(boundingBox: BoundingBox, p: (QuadTreeValue[S, T]) => Boolean)(using CanEqual[T, T]): QuadTree[S, T]

Filters any values who's spatial value interset with the BoundingBox.

Filters any values who's spatial value interset with the BoundingBox.

Attributes

Inherited from:
QuadTree
def filterByLine(line: LineSegment, p: (QuadTreeValue[S, T]) => Boolean)(using CanEqual[T, T]): QuadTree[S, T]

Filters any values who's spatial value intersect with the LineSegment.

Filters any values who's spatial value intersect with the LineSegment.

Attributes

Inherited from:
QuadTree
def filterByLine(start: Vertex, end: Vertex, p: (QuadTreeValue[S, T]) => Boolean)(using CanEqual[T, T]): QuadTree[S, T]

Filters any values who's spatial value intersect with the LineSegment.

Filters any values who's spatial value intersect with the LineSegment.

Attributes

Inherited from:
QuadTree
def findClosestTo(vertex: Vertex)(using CanEqual[T, T], SpatialOps[S]): Option[QuadTreeValue[S, T]]

Traverses the whole tree to find the element that is closest to the vertex specified. Slower than searchAt, but it will find a value assuming the tree has values in it.

Traverses the whole tree to find the element that is closest to the vertex specified. Slower than searchAt, but it will find a value assuming the tree has values in it.

Attributes

Inherited from:
QuadTree
def insert(values: Batch[(S, T)], idealCount: Int, minSize: Double, maxDepth: Int): QuadTree[S, T]

Insert a Batch of values of T (e.g. a String) with corresponding spatial values S (e.g. a BoundingBox or a Point) into the QuadTree with explicit option values.

Insert a Batch of values of T (e.g. a String) with corresponding spatial values S (e.g. a BoundingBox or a Point) into the QuadTree with explicit option values.

Attributes

Inherited from:
QuadTree
def insert(idealCount: Int, minSize: Double, maxDepth: Int)(values: (S, T)*): QuadTree[S, T]

Insert values T (e.g. a String) with corresponding spatial values S (e.g. a BoundingBox or a Point) into the QuadTree with explicit option values.

Insert values T (e.g. a String) with corresponding spatial values S (e.g. a BoundingBox or a Point) into the QuadTree with explicit option values.

Attributes

Inherited from:
QuadTree
def insert(location: S, value: T, idealCount: Int, minSize: Double, maxDepth: Int): QuadTree[S, T]

Insert value T (e.g. a String) with spatial value S (e.g. a BoundingBox or a Point) into the QuadTree with explicit option values.

Insert value T (e.g. a String) with spatial value S (e.g. a BoundingBox or a Point) into the QuadTree with explicit option values.

Attributes

Inherited from:
QuadTree
def insert(values: Batch[(S, T)])(using opts: InsertOptions): QuadTree[S, T]

Insert a Batch of values of T (e.g. a String) with corresponding spatial values S (e.g. a BoundingBox or a Point) into the QuadTree. QuadTree.InsertOptions are supplied via implicit / given; construct using given opts = QuadTree.options(..).

Insert a Batch of values of T (e.g. a String) with corresponding spatial values S (e.g. a BoundingBox or a Point) into the QuadTree. QuadTree.InsertOptions are supplied via implicit / given; construct using given opts = QuadTree.options(..).

Attributes

Inherited from:
QuadTree
def insert(values: (S, T)*)(using opts: InsertOptions): QuadTree[S, T]

Insert values T (e.g. a String) with corresponding spatial values S (e.g. a BoundingBox or a Point) into the QuadTree. QuadTree.InsertOptions are supplied via implicit / given; construct using given opts = QuadTree.options(..).

Insert values T (e.g. a String) with corresponding spatial values S (e.g. a BoundingBox or a Point) into the QuadTree. QuadTree.InsertOptions are supplied via implicit / given; construct using given opts = QuadTree.options(..).

Attributes

Inherited from:
QuadTree
def insert(location: S, value: T)(using opts: InsertOptions): QuadTree[S, T]

Insert value T (e.g. a String) with spatial value S (e.g. a BoundingBox or a Point) into the QuadTree. QuadTree.InsertOptions are supplied via implicit / given; construct using given opts = QuadTree.options(..).

Insert value T (e.g. a String) with spatial value S (e.g. a BoundingBox or a Point) into the QuadTree. QuadTree.InsertOptions are supplied via implicit / given; construct using given opts = QuadTree.options(..).

Attributes

Inherited from:
QuadTree
def prettyPrint: String

Prints the tree as a string, with the levels indented.

Prints the tree as a string, with the levels indented.

Attributes

Inherited from:
QuadTree
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def prune: QuadTree[S, T]

Simplifies the QuadTree by removing unused leaves and branches.

Simplifies the QuadTree by removing unused leaves and branches.

Attributes

Inherited from:
QuadTree
def removeAt(vertex: Vertex): QuadTree[S, T]

Removes the values at the quad directly under the vertex, if there is any. Note that while this is fast, it only works well for simple cases, or trees of vertices / points. This is because it does not visit the whole tree looking for other quads that might share ownership of this value. For example, if you add a bounding box the size of the whole tree, but then use removeAt to remove it's value in just one quad, say the top left quad, the box will continue to exist in all the other quads it touched.

Removes the values at the quad directly under the vertex, if there is any. Note that while this is fast, it only works well for simple cases, or trees of vertices / points. This is because it does not visit the whole tree looking for other quads that might share ownership of this value. For example, if you add a bounding box the size of the whole tree, but then use removeAt to remove it's value in just one quad, say the top left quad, the box will continue to exist in all the other quads it touched.

Attributes

Inherited from:
QuadTree
def removeByBoundingBox(boundingBox: BoundingBox)(using CanEqual[T, T]): QuadTree[S, T]

Removes any values who's spatial value interset with the BoundingBox.

Removes any values who's spatial value interset with the BoundingBox.

Attributes

Inherited from:
QuadTree
def removeByLine(line: LineSegment)(using CanEqual[T, T]): QuadTree[S, T]

Removes any values who's spatial value intersect with the LineSegment.

Removes any values who's spatial value intersect with the LineSegment.

Attributes

Inherited from:
QuadTree
def removeByLine(start: Vertex, end: Vertex)(using CanEqual[T, T]): QuadTree[S, T]

Removes any values who's spatial value intersect with the LineSegment.

Removes any values who's spatial value intersect with the LineSegment.

Attributes

Inherited from:
QuadTree
def removeClosestTo(vertex: Vertex)(using CanEqual[T, T], SpatialOps[S]): QuadTree[S, T]

Traverses the whole tree to find the element that is closest to the vertex specified, and removes it. Slower than removeAt, but it will find a value to remove, assuming the tree has values in it. On removal, all instances of that value are deleted from the tree.

Traverses the whole tree to find the element that is closest to the vertex specified, and removes it. Slower than removeAt, but it will find a value to remove, assuming the tree has values in it. On removal, all instances of that value are deleted from the tree.

Attributes

Inherited from:
QuadTree
def searchAt(vertex: Vertex): Batch[QuadTreeValue[S, T]]

Dives down to the leaf nodes directly under the vertex and returns it's values. Faster than findClosestTo as it does not traverse the tree, but only returns what is in the final quad, and won't look outside it for values.

Dives down to the leaf nodes directly under the vertex and returns it's values. Faster than findClosestTo as it does not traverse the tree, but only returns what is in the final quad, and won't look outside it for values.

Attributes

Inherited from:
QuadTree
def searchByBoundingBox(boundingBox: BoundingBox)(using CanEqual[T, T]): Batch[QuadTreeValue[S, T]]

Searches the tree for any values who's spatial value interset with the BoundingBox.

Searches the tree for any values who's spatial value interset with the BoundingBox.

Attributes

Inherited from:
QuadTree
def searchByLine(line: LineSegment)(using CanEqual[T, T]): Batch[QuadTreeValue[S, T]]

Searches the tree for any values who's spatial value interset with the LineSegment.

Searches the tree for any values who's spatial value interset with the LineSegment.

Attributes

Inherited from:
QuadTree
def searchByLine(start: Vertex, end: Vertex)(using CanEqual[T, T]): Batch[QuadTreeValue[S, T]]

Searches the tree for any values who's spatial value interset with the LineSegment.

Searches the tree for any values who's spatial value interset with the LineSegment.

Attributes

Inherited from:
QuadTree
def toBatch(using CanEqual[T, T]): Batch[QuadTreeValue[S, T]]

Return a Batch containing all the values in the QuadTree, please be aware that there will probably be duplicate entries.

Return a Batch containing all the values in the QuadTree, please be aware that there will probably be duplicate entries.

Attributes

Inherited from:
QuadTree

Inherited fields

val isEmpty: Boolean

Attributes

Inherited from:
QuadTree