This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > December 2003 > Making implementations of a PROTO without code reuse





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Making implementations of a PROTO without code reuse
PrisNo6

2003-12-23, 4:29 pm

I have a well-developed object proto - called SO_proto.wrl. It's a
sphere object for plotting. I want to do a number of implementations
of this object (or abstract class in OOP-speak), pre-setting some of
the object's display characteristics and behavior using declarations.
It would look like this:

SO_proto.wrl -implements-> DN_proto.wrl

and later, the user:

EXTENPROTO DN {}
DN_proto.wrl --creates--> DN display object

Users can then just call the DN_proto without worrying about all the
declaration settings.

Is there anyway to do this?

Inline-ing the SO object's behavior does not work because the PROTO
cannot reach the Inline via an IS statement. Maybe nesting PROTO's?

Currently, I have simply made another copy of SO_proto.wrl and renamed
and edited the file.

But this makes for code maintenance headaches; each code change has
to be updated to each implementation separately. Is there some way to
reuse the code in SO_proto.wrl.

Thanks - Kurt
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews