[x3d-public] Whither ISO/IEC 19777-3, 19777-4, 19777-5?
John Carlson
yottzumm at gmail.com
Tue Mar 19 18:49:23 PDT 2024
Dear Myeong,
I have a lot of TimeSensor code in my projects, and a fake TimeSensor API
declaration, perhaps fixing the setDEF, would be better sooner than a full
scale browser SAI implementation and tons of examples. I already have 50
examples which compile to .obj.
In other words, I value that you are doing building test cases. If you can
prioritize C++ examples over C and C#, that would help with collaboration.
I do know editing a stylesheet or two is difficult.
I am trying it easier to produce solid APIs using something derived from
X3DUOM, essentially X3DUOM plus AOP “advice” for various operations,
https://www.baeldung.com/spring-aop-advice-tutorial , dropping binding
source code directly into X3DUOM behavior both structural, which I call the
X3D Extended Object Model (X3DEOM). This can hopefully be used with a SAX
Parser and less complicated stylesheets, perhaps making the API generation
cross-binding language, with behavioral code in each binding language EOM.
Hopefully the behavioral part of EOM can be created with stylesheets or
parser-generators IDK. An X3D “SAX-Like” Parser has already been created
for creating skeleton advice in X3DEOM from X3DUOM.
My target API will first be ECMAScript, followed by TypeScript.
What I will do in the short term is create a sample C++ API for TimeSensor
such that my programs will compile and try to send you a copy.
I know diamond class inheritance problems are difficult!
Sincerely,
John
On Sun, Mar 17, 2024 at 1:27 AM John Carlson <yottzumm at gmail.com> wrote:
> Dear Myeong,
>
> Here is one C++ example (I'm not saying I'm necessarily coding right) that
> I'm having issues with. Setting X3DNode to a virtual base class of the
> subclasses created other issues, but your careful eyes on this would be
> great.
>
> bubbles.cpp
> bubbles.cpp(73): error C2385: ambiguous access of 'setDEF'
> bubbles.cpp(73): note: could be the 'setDEF' in base 'X3DNode'
> bubbles.cpp(73): note: or could be the 'setDEF' in base 'X3DNode'
>
>
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/cplusplus/net/coderextreme/data/Bubbles.cpp
>
> Here's the excerpted code that's failing:
>
> TimeSensor* TimeSensor14 = new TimeSensor();
> TimeSensor14->setDEF(CString("BubbleClock"));
> TimeSensor14->setCycleInterval(6);
> TimeSensor14->setLoop(True);
>
> I've tried without the CString.
>
> I probably could use an update to cl.exe. Please try on your system! If
> you have a set of includes available that you like to use, and work for
> this case, please let me know the locations on sourceforge, there are
> many to choose from! I am cherry picking the .h files in:
> www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample
> on the x3d project on sourceforge.
>
> Sincerely,
>
> John
>
> On Sun, Mar 17, 2024 at 12:38 AM John Carlson <yottzumm at gmail.com> wrote:
>
>> Dear Myeong,
>>
>> I've gotten 1/3 of my C++ examples compiling, not without some
>> difficulties.
>>
>> Here are changes I've made to support some version of the .h files:
>>
>> // replace addChildren with addChild
>>
>> if (method.indexOf("addChildren") >= 0) {
>> method =
>> method.replace("Children", "Child");
>> }
>> // replace ImageTexture methods (I don't know if I have the current .h
>> files)
>>
>> if (element.nodeName !==
>> "TextureBackground") {
>> method =
>> method.replace("setTopTexture", "setTop");
>> method =
>> method.replace("setBottomTexture", "setBottom");
>> method =
>> method.replace("setFrontTexture", "setFront");
>> method =
>> method.replace("setBackTexture", "setBack");
>> method =
>> method.replace("setLeftTexture", "setLeft");
>> method =
>> method.replace("setRightTexture", "setRight");
>> }
>>
>> // addParts is desirable, if you can make the change. Or I can change
>> addParts to addChild
>> method = method.replace("addParts",
>> "setParts"); // TODO, need addParts, or collect in array
>>
>> // The methods were not available, or there was some type conflict, so
>> use addChild.
>> method = method.replace("addFieldValue",
>> "addChild");
>> method = method.replace("addField",
>> "addChild");
>> method = method.replace("addJoints",
>> "addChild");
>> method = method.replace("addDisplacers",
>> "addChild");
>> method = method.replace("addConnect",
>> "addChild");
>> method = method.replace("addComponent",
>> "addChild");
>> method = method.replace("addShaders",
>> "addChild");
>> method = method.replace("setShape",
>> "addChild");
>> method =
>> method.replace("setProtoInterface", "addChild");
>> method = method.replace("setProtoBody",
>> "addChild");
>> method = method.replace("setIS",
>> "addChild");
>> method = method.replace("setAppearance",
>> "addChild");
>> method = method.replace("setMaterial",
>> "addChild");
>> method = method.replace("setCoord",
>> "addChild");
>> method = method.replace("setColor",
>> "addChild");
>> method = method.replace("setProxy",
>> "addChild");
>> method = method.replace("setTexCoord",
>> "addChild");
>> method =
>> method.replace("setTextureTransform", "addChild");
>> if (method.endsWith("setTexture")) {
>> method =
>> method.replace("setTexture", "addChild");
>> }
>>
>> Here are the includes I am currently using:
>>
>> #include "C:/x3d-code/
>> www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/SphereExample/pch.h
>> "
>> #include "C:/x3d-code/
>> www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/SphereExample/framework.h
>> "
>> #include "C:/x3d-code/
>> www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/include/XML_PARSER.h
>> "
>> #include "C:/x3d-code/
>> www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/include/X3DLib.h
>> "
>> #include "C:/x3d-code/
>> www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/include/glMath.h
>> "
>> #include "C:/x3d-code/
>> www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/include/glut.h
>> "
>>
>> If you have a better set, let me know.
>>
>> Here are my current set of .cpp files:
>> https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/cplusplus/net/coderextreme/data (some
>> may be out of date).
>>
>> Here are the ones that compile:
>>
>> abox.obj
>> app.obj
>> ArchHalf.obj
>> ArchPrototype.obj
>> ArtDecoPrototypes.obj
>> asmallbox.obj
>> asphere.obj
>> asteroids.obj
>> BoxEm.obj
>> BoxEm2.obj
>> Bushes.obj
>> CameraShape.obj
>> Cane.obj
>> CoordinateAxes.obj
>> DesignPatternsApparelMedicalSkinLayers.obj
>> ExtrusionHeart.obj
>> freewrlflowers.obj
>> glflowers.obj
>> HelloWorld.obj
>> HelloWorldCommented.obj
>> HelloWorldMinimal.obj
>> IcosahedronSubdivisionLevel5.obj
>> IFS.obj
>> indexedfaceset_pixeltexture_entire.obj
>> indexedfaceset_pixeltexture_part.obj
>> indexedfaceset_pixeltexture_plus.obj
>> indexedfaceset_pixeltexture_whole.obj
>> JointCoordinateAxes.obj
>> jumpcut_loadurl.obj
>> KoreanCharacter01Jin.obj
>> KoreanCharacter02Chul.obj
>> KoreanCharacter03Hyun.obj
>> KoreanCharacter04Young.obj
>> KoreanCharacter05Ju.obj
>> KoreanCharacter06Ga.obj
>> KoreanCharacter07No.obj
>> KoreanCharacter08Da.obj
>> KoreanCharacter09Ru.obj
>> KoreanCharacter10Mi.obj
>> KoreanCharacter11Min.obj
>> KoreanCharacter12Sun.obj
>> MainStage.obj
>> Marine.obj
>> MaskAndSnorkel.obj
>> Pathway.obj
>> plainflowers.obj
>> qq3.obj
>> rgb_alpha.obj
>> rubik.obj
>> rubikFurnace.obj
>> rubikOnFire.obj
>> ScubaTank.obj
>> StringArrayEncodingExamples.obj
>> TextExamples.obj
>> ThreeDTexture.obj
>> ViewFrustumExample.obj
>> ViewFrustumPrototype.obj
>> x3domflowers.obj
>>
>> Many of the remaining problems involve ambiguity in the base class
>> (diamond class problem?) which I have forgotten how to fix, but I will look
>> it up.
>>
>> John
>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20240319/c9fba7c4/attachment-0001.html>
More information about the x3d-public
mailing list