[x3d-public] ProtoBody completeness in nested Protos

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Sun Apr 24 21:42:59 PDT 2022


Actually please look a little more closely at that (admittedly tricky)
example.

* CircleFish is an ExternProto, separately defined in another file
* CircleFishLod is a ProtoDeclare defined in that first file,
CircleFishLodPrototype.x3d
* CircleFishLod ProtoBody contains two ProtoInstance copies of CircleFish
* CircleFishLod ProtoDeclare is then followed by a CircleFishLod
ProtoInstance (again  in CircleFishLodPrototype.x3d)

So I would expect an X3D Browser to

a. load ExternProtoDeclare      CircleFish
b. build ProtoDeclare                CircleFishLod
c. create inner ProtoInstance  CircleFish for use
d. create outer ProtoInstance CircleFishLod

Order of steps might vary a bit, but those are the dependencies.  Good luck
sir.

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 https://
faculty.nps.edu/brutzman

-----Original Message-----
From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of Andreas Plesch
Sent: Sunday, April 24, 2022 9:08 PM
To: X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: [x3d-public] ProtoBody completeness in nested Protos

ProtoDeclarations may use ProtoInstances of other Protos inside their
ProtoBody definitions.

For example, the CircleFishLod proto here:

https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fx3dgraphic
s.com%2Fexamples%2FX3dForWebAuthors%2FKelpForestExhibit%2FCircleFishLodProto
typeIndex.html&data=05%7C01%7Cbrutzman%40nps.edu%7C0b4a867ba9874e371f9b0
8da267152fa%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637864565880708349%
7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwi
LCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=upr4eckI8axT7MO5fAUvAWfyBzUJfhTwqcp
BuH7tZjc%3D&reserved=0

uses ProtoInstances of the CircleFish proto.

A more extreme case of nesting is:

https://www.web3d.org/x3d/content/examples/ConformanceNist/Miscellaneous/PRO
TO/fivedeepnestingIndex.html

where Proto1 uses ProtoInstance of Proto2 inside its ProtoBody. Proto2
itself uses a ProtoInstance of Proto3 inside its ProtoBody. And so on to
five levels deep.

The second example with the deep nesting currently works with x3dom but the
seemingly simpler CircleFishLod proto does not.

The reason is that x3dom expects the complete definition of a proto to be
contained in its ProtoBody. However, The CircleFishLod proto only contains
the CircleFish ProtoInstances in the body but not the associated CircleFish
ProtoDeclaration which for some reason occurs outside the CircleFishLod
ProtoBody (and outside the CircleFishLod ProtoDeclaration).

Expecting the ProtoBody to be complete and self-contained seems rather
natural. Is x3dom too strict in this regard, or is there an oversight in the
example ? There is not much guidance in the spec., if any.

Thanks, Andreas

--
Andreas Plesch
Waltham, MA 02453

_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5353 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220425/fd0c2636/attachment-0001.p7s>


More information about the x3d-public mailing list