I’m trying to make a simple 2D editor with the following capabilities:
- Create/delete rectangles, polygons, circles, etc
- Hierarchical grouping of these shapes
- Move, rotate, scale these shapes
- Apply a certain texture to them (with UV coordinates for each vertex)
I’ve had some success, but the code is messy. Are they any simple projects or articles that I can read to get some more info on the kinds of data structures used for such projects?
There is a lot of literature out there to get good ideas from. Some good ones:
IEEE Tutorial: Computer Graphics ’79 has all the important graphics algorithms from the 60s and 70s, many are the original articles.
Graphics Gems (I) surveys important techniques from the 80s.
You might also want to look at PHIGS which focuses on Hierarchical Graphics.