aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-21 19:06:58 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-21 19:06:58 +0200
commitfab0fccc0aaa18e915bcd08e81e5a04177e435cd (patch)
tree0e8e51ff61c88b60d1f845bc9fde20ea5ba7099b /docs
parent10ce9f45b9551dc103272c2b2374db1c1e3b8bcb (diff)
fix quad tree collision checker
Diffstat (limited to 'docs')
-rw-r--r--docs/class-diag.puml22
1 files changed, 21 insertions, 1 deletions
diff --git a/docs/class-diag.puml b/docs/class-diag.puml
index 062cf2a..8058e0a 100644
--- a/docs/class-diag.puml
+++ b/docs/class-diag.puml
@@ -96,19 +96,39 @@ rectangle Group_Algorithms as "Algorithms" <<group>> {
class PathfindingContext {
+ PathfindingContext(Museum &)
}
+ together {
class CollisionContext {
+ CollisionContext(Museum &)
}
+ class CollisionChecker {
+ + CollisionChecker(Museum &)
+ + check(Artist & a, Artist & b)
+ }
+ class QuadTreeCollisionChecker {
+ + QuadTree(Museum &)
+ + QuadTree(parent : QuadTree *, boundary : Rectangle &)
+ }
+ class NaiveCollisionChecker {
+ }
+
+ CollisionChecker <|-- QuadTreeCollisionChecker
+ CollisionChecker <|-- NaiveCollisionChecker
+ CollisionContext -> CollisionChecker
+ }
}
rectangle Group_Model as "Model" <<group>> {
class Museum {
+ people : People
+ canvas : Canvas
+ + collision : CollisionContext
+ + pathfinding : PathfindingContext
--
+ + paused : bool
+ update()
+ + skip_forward()
+ + skip_backward()
--
- - paused : bool <<+get>> <<+set>>
- jump : unsigned long
--
- working : bool