Home Overview FAQ Documentation Download Mailing List Geomview For Windows? Support Users Development Bug Reporting Contributing Contact Us Sponsors
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [ REQ 6966]: geomview questions
Michaud, Joe writes: > Your help was invaluable the last time I requested it, I hope > you will have time to help me with these new sticking points Great, glad it helped. > (Would you prefer me to communicate with software@geom.umn.edu?). Yup, since then the answers get logged. > These are actions I don't know how to command from an external > module via stdout : > 1. Turn on orthographic projection? > I tried ( camera {orthographic 1 } ) and got back > camera: camera expected in arg position 2 (got nil) Two problems. First, you need to give a camera ID between the "camera" keyword and the camera specification. "targetcam" or "allcams" are usually good choices that will work no matter what configuration you're in. Second, the relevant field in the camera specification is "perspective" and you can toggle it between 0 and 1. So this will work: (camera allcams {perspective 0}) > > 2. Toggle Motion/Inertia on or off? Unfortunately there's no GCL that will do this, even though you can do it from the GUI. The hack for this is to simulate pressing the hotkey shortcut of 'ui': (rawevent 117 1 0 0 0) (rawevent 105 1 0 0 0) > 3. Pick one OOGL out of several loaded from an external model > to be non-movable (Immune to Tool/Mouse actions)? Well, there's a mechanism for specifying geometry that should be drawn but not controllable via the UI. You'd say (new-alien mything {<geometry specification>}) instead of (new-geometry mything {<geometry specification>}) Here's the blurb about aliens: Create a new alien (geom not in the world) with the given name (a string). GEOMETRY is a string giving an OOGL geometry specification. If GEOMETRY is omitted, the new alien is given an empty geometry. If an object with that name already exists, the new alien is given a unique name. The light beams that are used to move around the lights are an example of aliens. They're drawn but are not controllable the way ordinary objects are: they don't appear in the object browser and the user can't move them with the normal motion modes. If you have several OOGL objects, and you don't know in advance which one of them you want to immobilize (i.e. perhaps because the user will pick one on the fly), then you have to do something a little bit complicated to transparently swap between "geometry" status and "alien" status for a random object behind the scenes. You'll need to use handles, which is a mechanism for efficiently manipulating geometry without having to reload the whole thing each time. The reason that it's complicated is that you have to explicitly discover the position of a geometry object so that the alien object is told to appear in the same spot. I'm assuming that an object could have been interactively moved away from the origin before you select it to be immobile. (progn (geometry thing1 { :handle1 }) (geometry thing2 { :handle2 }) (geometry thing3 { :handle3 }) (hdefine geometry handle1 { < xyz.vect }) (hdefine geometry handle2 { < hdodec.off }) (hdefine geometry handle3 { < HingeCube }) (redraw targetcam) ) Then when the user picks a specific object, say thing2, to be immobile, you'd do this: (write transform /tmp/transform thing2 universe) (new-alien foo { INST transform { < "/tmp/transform" } geom { :handle2 }}) (delete thing2) Then to switch to making thing2 mobile again and making thing3 immobile, you'd do this: (geometry thing2 { : handle2 }) (delete foo) (write transform /tmp/transform thing3 universe) (new-alien foo { INST transform { < "/tmp/transform" } geom { :handle3 }}) (geometry thing3 { :emptyhandle }) This works, except for the potential problem that the user can still pick the empty geometry thing2 and try to wiggle it around with the mouse. They won't see anything happen, but when you make it visible again it won't be in the right place. I'd think that the right thing to is to say (xform-set thing3 { < "/tmp/transform" }) but this causes a mysterious jump that I don't understand. Stuart and/or Mark, any ideas? > Also, are there any fonts available in addition to the included > alphabet.vect? Well, you should be able to use the Labeler module to create polygononized flat fonts from the ones installed on your system. It will be more computationally intensive, of course. Does that work for you? Also, do you know about the hvectext utility, which can also make using vector fonts much more convenient? > Thanks again, > > Joe Michaud, Senior Engineer > Lockheed Martin Skunk Works Now *that's* a good group name. TM --- Tamara Munzner munzner at cs.stanford.edu http://graphics.stanford.edu/~munzner
|
||
Home | Overview | FAQ | Documentation | Support | Download | Mailing List Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors |
|||
site hosted by |