Reputation: 2990
I'm looking for some advanced tutorials or maybe open-source applications written in C++ or .NET that would implement a complex vector-based application, something like MS Visio or Autocad. What I need to know is how the guru of such applications are managing the rendering of complex objects (> 1000 rectangle) on mouse move, when user can move a complex object over other complex objects. I know about XOR painting and stuff, but if you check the above applications is clearly they are not using this technique. The whole object moves smoothly on top on another, not only its XOR reflection. Plus the moving objects show some additional info while moved, like current coordinates, or something else, so is not a static representation of it saved in a bitmap.
Any advises are welcome.
Thx
Upvotes: -1
Views: 760
Reputation: 11251
A lot of graphical applications use some kind of spatial partitioning to prune down the number of objects they need to look at. For example, if you move a rectangle, the application looks in a quadtree and finds the 2 or 3 other objects whose bounding boxes overlap the moving rectangle. Then it only needs to do a full collision detection and graphics processing with 2 or 3 objects instead of 1000.
Upvotes: 1