Re: Spec. Changes

Len Wanger ([email protected])
Mon, 15 May 1995 14:46:38 -0700 (PDT)


> > - WWWAnchor: the map SFEnum field should be: NONE, POINT, or TEXTURE,
> > with TEXTURE appending the s and t values of the texture coordinates
> > picked to the url. If the mapping function is to allow the equivalent of
> > html-based image maps in vrml, then texture coordinates are much more
> > useful that object space coordinates.
>
> I like this idea. It would be easy to add and it would really make doing
> an imagemap like function very simple. I've been concerned about this and
> TEXTURE would solve the problem nicely. But perhaps map should be an
> SFBitMask so POINT and TEXTURE could be passed separately. This way,
> specifying just TEXTURE would return only 2 values, POINT would return 3,
> and both would return 5 values.
>
> But while this issue is on the floor. I've had a couple of requests for a
> map type of NORMAL, which would return the object normal. This makes it a
> bit easier to tell which surface of a cylinder or cube was touched, among
> other things.

I think the idea of an SFBitMask for the map field is a good one.

> > - Field changes: Similar to how state parameters can be passed into
> > URLs from forms, browsers should be able to handle URLs specified in
> > the form:
> >
> > url?field=value&field2=value2&...&fieldn=valuen
>
> I'd like to see this issue deferred till 1.1 - both because it's hard to
> implement at this late stage and there are difficult issues relating to
> syntax.

I can live with this being in v1.1. But I think this will be a very
nice way to do light weight interaction without having to deal with
the complexity of behaviors.

For those who were looking for an example of this, the following would
highlight the cube or sphere when their anchor is fired. It works by
embedding a new value for a named field into the url, similar to how
the value of a field in a form is currently sent in html.

#VRML V1.0 ascii

Separator {
DirectionalLight {
direction 0 0 -1 # Light shining from viewer into scene
}
PerspectiveCamera {
position -8.6 2.1 5.6
orientation -0.1352 -0.9831 -0.1233 1.1417
focalDistance 10.84
}

Separator { # The red sphere
DEF sphere_material Material {
diffuseColor 0.5 0 0 # Red
}

# This anchor will change the diffuseColor of the cube to highlight
# it (by making it full intensity red) when this link is picked.
# Note, that it is using setting a field value on a named node.
# I am assuming that this vrml file is called this_page.wrl, and
# can be addresed through a relative url.
WWWAnchor {
name "this_page.wrl?sphere_material.diffuseColor=1 0 0"
}
Translation { translation 3 0 1 }
Sphere { radius 2.3 }
}
Separator { # The blue cube
DEF cube_material Material {
diffuseColor 0 0 0.5 # Blue
}

WWWAnchor {
name "this_page.wrl?cube_material.diffuseColor=0 0 1.0"
}

Transform {
translation -2.4 .2 1
rotation 0 1 1 .9
}

Cube {}
}
}

Len Wanger -- [email protected]
Interactive Simulations Inc.
http://www.intsim.com/~isigen