From: jpc@tauon.ph.unimelb.edu.au (John Costella) Subject: Re: TECH: Hierarchical Object Addressing Date: Wed, 3 Feb 93 9:32:07 EST > Does anyone have any good methods for addressing parts of an object in a > software-friendly way? > for the purposes of animation etc. I would like to use something like > > MOVE 'dog' 1, 3, 4 > ROTATE 'dog' ' rear left shin' 0 30 0 > > This is fine if all the parts of the dog are uniquely named, but what if > they're not? Perhaps I've built the dog out of standard parts from an object > database and the shin part of a dog's leg is called 'shin' how do I access > it? > > My solution was to use a path name: > > object 'dog' > part 'rear:left leg:shin' Aim to abstract the procedure more and more as your system develops. When you're starting off you'll probably use your first example; when this becomes unwieldy you'll move to the second. But then even this might become unwieldy so then you might simply say ``dog walk to fire hydrant'', ``dog cock leg'', etc. Let the dog worry about how he's going to move his shins. If the dog then metamorphises from a poodle into a German Shepherd, only the dog object's code changes, not the rest of the system. John ---------------------------------------------------------------------------- John P. Costella School of Physics, The University of Melbourne jpc@tauon.ph.unimelb.edu.au Tel: +61 3 543-7795, Fax: +61 3 347-4783 ----------------------------------------------------------------------------