[semantics-public] [x3d-public] representing DEF/USE information
GPU Group
gpugroup at gmail.com
Fri Nov 15 10:52:15 PST 2019
Stack node > how about for Inlines and Protos - rather than passing through
or routing some parameters, would push and pop.
<ProtoDeclare name='funnyBox'>
...
<Shape>
<Box/>
</Shape>
...
</ProtoDeclare>
<Stack type='material' name='MyMat2'>
<ProtoInstance name='funnyBox'/>
</Stack>
I wonder if this would make libraries of objects easier to use.
-Doug
On Thu, Nov 14, 2019 at 2:57 PM Brutzman, Donald (Don) (CIV) <
brutzman at nps.edu> wrote:
> OK I'll bite...
>
> On 11/7/2019 12:24 PM, GPU Group wrote:
> > IDEA: a stack-based method for default USE
>
> hmmm
>
> > In the past I've used Switch -1 to hide pre-defined nodes for later USE.
>
> Me too. Great technique.
>
> For anyone who wants to see an example, please see
>
> X3D Example Archives: X3D for Web Authors, Chapter 09 Event
> Utilities Scripting, Integer Sequencer Road Sign Switcher
>
> https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter09EventUtilitiesScripting/IntegerSequencerRoadSignSwitcherIndex.html
>
> Similar approach could apply a separate TouchSensor and IntegerTrigger,
> shape by shape, to each select an appropriate child under a single Switch.
> Pretty common technique.
>
> > Another idea: to have some generic way to change a default via a stack
> of some sort:
> > <Stack name="material" USE='funnyMaterial'>
> > <Shape>
> > - no material mentioned, no USE here, gets the default which is
> funnyMaterial
> > </Shape>
> > <Stack name='material' USE='seriousMaterial'>
> > <Shape>
> > - no material mentioned, gets default which is now seriousMaterial
> > </Shape>
> > </Stack> - pops serious
> > <Shape>
> > - no material mentioned, gets default which is back to funnyMaterial
> > </Shape>
> > </Stack> - pops funny
> > <Shape>
> > - no material mentioned, gets x3d default material
> > </Shape>
> > But I haven't thought about when / what other scenarios that would be
> useful for. Just something new related to DEF/USE.
> > -Doug Sanden
>
> For this possibility here is a slippery slope to worry about. It is
> starting to look like a programming language... Looks like it would either
> a. require Script logic, or
> b. become unpredictable/nondeterministic.
>
> Both are more complex, and thus hard to encourage. Also not sure that a
> Stack adds some new/valuable capability that can't be accomplished already
> with the existing palette of X3D nodes.
>
> If there is a use case that significantly eases existing modeling, then
> maybe. But our current Event Utility nodes are pretty darn simple so they
> will be tough to surpass.
>
> all the best, Don
> --
> Don Brutzman Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/semantics-public_web3d.org/attachments/20191115/c19d43b6/attachment.html>
More information about the semantics-public
mailing list