[PR #41] [MERGED] Implement RTree Data Structure #56

Closed
opened 2025-12-29 05:19:21 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dscyrescotti/Memola/pull/41
Author: @dscyrescotti
Created: 6/5/2024
Status: Merged
Merged: 6/5/2024
Merged by: @dscyrescotti

Base: mainHead: feature/r-tree-impl


📝 Commits (4)

  • eebf45b refactor: save quads right after they are added
  • e4dc567 feat: implement rtree
  • 90dfe97 feat: replace array with rtree
  • cf12613 feat: add any stroke wrapper

📊 Changes

15 files changed (+547 additions, -106 deletions)

View changed files

📝 Memola.xcodeproj/project.pbxproj (+24 -0)
📝 Memola/Canvas/Contexts/GraphicContext.swift (+32 -25)
📝 Memola/Canvas/Core/Canvas.swift (+0 -4)
Memola/Canvas/Geometries/Stroke/Core/AnyStroke.swift (+28 -0)
📝 Memola/Canvas/Geometries/Stroke/Core/Stroke.swift (+13 -10)
📝 Memola/Canvas/Geometries/Stroke/Generators/SolidPointStrokeGenerator.swift (+1 -27)
📝 Memola/Canvas/Geometries/Stroke/Strokes/EraserStroke.swift (+0 -6)
📝 Memola/Canvas/Geometries/Stroke/Strokes/PenStroke.swift (+25 -26)
📝 Memola/Canvas/History/History.swift (+3 -3)
Memola/Canvas/RTree/Box.swift (+60 -0)
Memola/Canvas/RTree/Node.swift (+35 -0)
Memola/Canvas/RTree/RTree.swift (+316 -0)
📝 Memola/Canvas/RenderPasses/GraphicRenderPass.swift (+2 -1)
📝 Memola/Canvas/View/Bridge/ViewController/CanvasViewController.swift (+4 -4)
📝 Memola/Extensions/CGRect++.swift (+4 -0)

📄 Description

Description

This PR adds RTree data structure for efficient retrieval of strokes only visible in the bounds of scroll view.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dscyrescotti/Memola/pull/41 **Author:** [@dscyrescotti](https://github.com/dscyrescotti) **Created:** 6/5/2024 **Status:** ✅ Merged **Merged:** 6/5/2024 **Merged by:** [@dscyrescotti](https://github.com/dscyrescotti) **Base:** `main` ← **Head:** `feature/r-tree-impl` --- ### 📝 Commits (4) - [`eebf45b`](https://github.com/dscyrescotti/Memola/commit/eebf45b20a1cd1ff6e54070e843e0b5b30a5e8f2) refactor: save quads right after they are added - [`e4dc567`](https://github.com/dscyrescotti/Memola/commit/e4dc567819981f5408629b817fa23ad2cd026d27) feat: implement rtree - [`90dfe97`](https://github.com/dscyrescotti/Memola/commit/90dfe97f9eb5fa30a23a6eff5f3a3711ec2e4574) feat: replace array with rtree - [`cf12613`](https://github.com/dscyrescotti/Memola/commit/cf126134393264686c278f10b7ec5c1dd1fa9916) feat: add any stroke wrapper ### 📊 Changes **15 files changed** (+547 additions, -106 deletions) <details> <summary>View changed files</summary> 📝 `Memola.xcodeproj/project.pbxproj` (+24 -0) 📝 `Memola/Canvas/Contexts/GraphicContext.swift` (+32 -25) 📝 `Memola/Canvas/Core/Canvas.swift` (+0 -4) ➕ `Memola/Canvas/Geometries/Stroke/Core/AnyStroke.swift` (+28 -0) 📝 `Memola/Canvas/Geometries/Stroke/Core/Stroke.swift` (+13 -10) 📝 `Memola/Canvas/Geometries/Stroke/Generators/SolidPointStrokeGenerator.swift` (+1 -27) 📝 `Memola/Canvas/Geometries/Stroke/Strokes/EraserStroke.swift` (+0 -6) 📝 `Memola/Canvas/Geometries/Stroke/Strokes/PenStroke.swift` (+25 -26) 📝 `Memola/Canvas/History/History.swift` (+3 -3) ➕ `Memola/Canvas/RTree/Box.swift` (+60 -0) ➕ `Memola/Canvas/RTree/Node.swift` (+35 -0) ➕ `Memola/Canvas/RTree/RTree.swift` (+316 -0) 📝 `Memola/Canvas/RenderPasses/GraphicRenderPass.swift` (+2 -1) 📝 `Memola/Canvas/View/Bridge/ViewController/CanvasViewController.swift` (+4 -4) 📝 `Memola/Extensions/CGRect++.swift` (+4 -0) </details> ### 📄 Description ### Description This PR adds RTree data structure for efficient retrieval of strokes only visible in the bounds of scroll view. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 05:19:21 +01:00
adam closed this issue 2025-12-29 05:19:21 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Memola#56