[x3d-public] Whither ISO/IEC 19777-3, 19777-4, 19777-5?

John Carlson yottzumm at gmail.com
Sat Mar 16 23:27:33 PDT 2024


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/20240317/9594754b/attachment-0001.html>


More information about the x3d-public mailing list