home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!cs.utexas.edu!uwm.edu!daffy!uwvax!heurikon!vme.heurikon.com!kah
- From: kah@vme.heurikon.com (Ken Heitke)
- Newsgroups: comp.sys.mac.programmer
- Subject: Object Drawing question
- Message-ID: <1848@heurikon.heurikon.com>
- Date: 5 Nov 92 16:19:04 GMT
- Sender: news@heurikon.heurikon.com
- Reply-To: kah@heurikon.heurikon.com (Ken Heitke)
- Distribution: na
- Organization: Heurikon Corporation, Madison, WI
- Lines: 18
-
- I have been tinkering around with a simple object drawing program and have
- been wondering about the best data structures to use to handle quick selection
- and update of objects. I want to be able to handle several hundred objects.
-
- The brute force method would be to maintain a simple list of all the objects and
- then traverse the list check if the point is in the object (I know how to do
- this). I would rather store the objects to reduce the number of objects that
- have to be tested (sorted list, Btree, etc).
-
- Also when it comes to update events, the brute force method is to erase
- everything and then traverse the list and draw each object in the list. I would
- again like to minimize the number of objects to be tested and redrawn.
-
- How is this usually handled or is the brute force method sufficient. Any
- pointers to books, articles, code samples, etc would be appreciated.
-
- thanks,
- Ken Heitke ken.heitke@heurikon.com
-