[X3D-Public] Any way to get 'this' proto instance inside itself?
Braden McDaniel
braden at endoframe.com
Sun Oct 31 23:38:24 PDT 2010
On Sun, 2010-10-31 at 22:53 -0700, Dave A wrote:
> What I ended up doing was adding
>
> inputOutput SFNode thisInstance NULL
>
> to the proto def, and all instances must reference itself:
>
> DEF p1 myproto { thisInstance USE p1 }
>
> If there's a better way, I'd like to hear it.
I think what I suggested is better since it doesn't require any special
action at the instantiation point. Why don't you like it?
> If not, would like to
> request it as a feature for next go-around.
I'm still not seeing a need for this. Within the PROTO definition, you
have access to the PROTO instance interfaces via IS. inputOutput
interfaces that aren't IS'd are kind of a special case; but it's easy
enough to contrive an interface in the definition just for the purpose
of adding IS, thus making the PROTO interface available to the
definition.
--
Braden McDaniel <braden at endoframe.com>
More information about the X3D-Public
mailing list