diff options
author | sanine <sanine.not@pm.me> | 2022-05-25 14:17:04 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-05-25 14:17:04 -0500 |
commit | 2c9567e42d2e96de3479f95125f0fff04ff52c2d (patch) | |
tree | d6b433504a8eb3f5d3011562d2086c430988da5c /modules/KDTree.js | |
parent | 49b3a5cf1ea2d7ed3f1bf9c1262ee92d66a83a7d (diff) |
begin refactor to use quadtree
Diffstat (limited to 'modules/KDTree.js')
-rw-r--r-- | modules/KDTree.js | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/modules/KDTree.js b/modules/KDTree.js deleted file mode 100644 index d9133d1..0000000 --- a/modules/KDTree.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -class NodeType { - static Leaf = new NodeType('Leaf'); - static Branch = new NodeType('Branch'); - - constructor(name) { this.name = name; } - toString() { return `NodeType.${this.name}`; } -} - - -class LeafNode { - constructor(point) { - this.type = NodeType.Leaf; - this.point = point; - } -} -class BranchNode { -} - - -class KDTree { - constructor() { - this.root = null; - } - - insert(point) { - this.root = new LeafNode(point); - } -} - -export { KDTree, NodeType, LeafNode, BranchNode }; -export default KDTree; |