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] Re: [Closed REQ 5948]: Geomview Syntax Question
Yes, it's possible. There are a couple of ways to do it. In case you've made each object be a separate item in the geomview browser (as in your example with the (new-geometry ...) command), you can use (merge-ap ...) to set its appearance, as in: (new-geometry fred { < xyz.vect }) (merge-ap fred { -face +edge material { diffuse 1 .5 0 } }) Caveat: Geomview's control panels normally use the OOGL "override" feature to ensure that any manual settings supercede anything specified in the objects themselves, including settings specified by the (merge-ap ...) command. So if you manually turn edges off, the above example wouldn't succeed in turning them back on. But you can use your own override-style settings yourself, which will beat any manual settings; just precede each relevant appearance feature with an asterisk, as in (merge-ap fred { *-face *+edge material { *diffuse 1 .5 0 } }) You might also want to adjust the appearance of an object buried inside an OOGL hierarchy. The natural way to do this would be via an "appearance handle", but unfortunately we didn't implement those. Nevertheless you can get the equivalent via a hack like the following. Given a composite of two things: { LIST { ... thing1 ... } { ... thing2 ... } } Suppose you'd like to be able to make changes to any of these. It's simplest if the original list were constructed using handles. There's some mention of these in the OOGL documentation; they're essentially free variables. You can build an OOGL hierarchy containing handles, then effectively change the contents of the hierarchy by (re-)assigning values to them. Handles can be of several types, including general OOGL geometry data or transformations (4x4 matrices). You might say: (geometry stuff { LIST { : thing1wrapperhandle } { : thing2wrapperhandle } } ) (hdefine geometry thing1wrapperhandle { LIST { : thing1handle } }) (hdefine geometry thing2wrapperhandle { LIST { : thing2handle } }) (hdefine geometry thing1handle { ... OOGL data for thing1 ... }) (hdefine geometry thing2handle { ... OOGL data for thing2 ... }) Now, to alter the appearance of thing1, change the value of thing1wrapperhandle. The LISTs mentioned here just serve the purpose of deepening the hierarchy, leaving a slot to attach an appearance, as in: (hdefine geometry thing1wrapperhandle { appearance { +face -edge } LIST { : thing1handle } } ) Hope this makes sense.
|
||
Home | Overview | FAQ | Documentation | Support | Download | Mailing List Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors |
|||
site hosted by |