aboutsummaryrefslogtreecommitdiff
path: root/docs/class-diag.puml
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-22 20:04:41 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-22 20:04:41 +0200
commite522f2a36ee00a3e0890adb2c34bfc8431711265 (patch)
tree093f94958897edba4156ef7345f03707cd84a8a1 /docs/class-diag.puml
parent3e1b0eb968d90f1ba5163b220c4e39dd7fd1e51b (diff)
update class diagram
Diffstat (limited to 'docs/class-diag.puml')
-rw-r--r--docs/class-diag.puml42
1 files changed, 34 insertions, 8 deletions
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" <<group>>
TXTParser -r[hidden] XMLParser
}
-rectangle Group_Algorithms as "Algorithms" <<group>> {
- class PathfindingContext {
- + PathfindingContext(Museum &)
- }
- together {
+rectangle Group_Collisions as "Collisions" <<group>> {
class CollisionContext {
+ CollisionContext(Museum &)
+ + update()
+ + get_checker() : shared<CollisionChecker>
+ + cycle_method()
+ --
+ - museum : Museum &
+ - checker : shared<CollisionChecker>
+ - checker_index : size_t
+ - create_checker() : shared<CollisionChecker>
}
class CollisionChecker <<abstract>> {
+ CollisionChecker(Museum &)
+ compare(Artist & a, Artist & b)
+ check() <<pure virtual>>
+ --
+ # 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<QuadTreeCollisionChecker>[4]
+ + check()
+ --
+ - capacity : const int
+ - artists : forward_list<Artist *>
+ - 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" <<group>> {
+ class PathfindingContext {
+ + PathfindingContext(Museum &)
}
-
}
rectangle Group_Model as "Model" <<group>> {
class Museum {