From fab0fccc0aaa18e915bcd08e81e5a04177e435cd Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Mon, 21 Oct 2024 19:06:58 +0200 Subject: fix quad tree collision checker --- docs/class-diag.puml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'docs') 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" <> { 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" <> { 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 -- cgit v1.2.3