From e522f2a36ee00a3e0890adb2c34bfc8431711265 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Tue, 22 Oct 2024 20:04:41 +0200 Subject: update class diagram --- docs/class-diag.puml | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) (limited to 'docs/class-diag.puml') diff --git a/docs/class-diag.puml b/docs/class-diag.puml index 9a37256..b20b3e1 100644 --- a/docs/class-diag.puml +++ b/docs/class-diag.puml @@ -98,31 +98,57 @@ rectangle Group_ParsingDeserialization as "Parsing & deserialization" <> TXTParser -r[hidden] XMLParser } -rectangle Group_Algorithms as "Algorithms" <> { - class PathfindingContext { - + PathfindingContext(Museum &) - } - together { +rectangle Group_Collisions as "Collisions" <> { class CollisionContext { + CollisionContext(Museum &) + + update() + + get_checker() : shared + + cycle_method() + -- + - museum : Museum & + - checker : shared + - checker_index : size_t + - create_checker() : shared } class CollisionChecker <> { + CollisionChecker(Museum &) + compare(Artist & a, Artist & b) + check() <> + -- + # museum : Museum & } class QuadTreeCollisionChecker { - + QuadTree(Museum &) - + QuadTree(parent : QuadTree *, boundary : Rectangle &) + + constructor(Museum &) + - constructor(parent : this, boundary : const Rectangle &) + -- + + get_boundary() : const Rectangle & + + subtree : uniq[4] + + check() + -- + - capacity : const int + - artists : forward_list + - artists_size : size_t + - boundary : Rectangle <<+get>> + -- + - subdivide() + - cull() } class NaiveCollisionChecker { + + check() + } + class NullCollisionChecker { + + check() } CollisionChecker <|-- QuadTreeCollisionChecker CollisionChecker <|-- NaiveCollisionChecker + CollisionChecker <|-- NullCollisionChecker CollisionContext -> CollisionChecker +} +rectangle Group_Pathfinding as "Pathfinding" <> { + class PathfindingContext { + + PathfindingContext(Museum &) } - } rectangle Group_Model as "Model" <> { class Museum { -- cgit v1.2.3