Hello,
I'm new to OpenGEX, however the coding examples are a bit lacking, especially on the import side.
There are absolutely no coding examples on how to access any of the data we need.
We need to see C++ coding examples on how to access data from every OpenGEX structure available:
Metric
GeometryNode
GeometryObject
Material
etc...
Or we need at least a basic C++ program that loads in a OGEX file and prints out every bit of information
as text to the commandline.
For example, starting with this:
const Structure *structure = openGexDataDescription.GetRootStructure()->GetFirstSubnode();
while (structure)
{
// This loops over all top-level structures in the file.
// Do something with the data...
structure = structure->GetNextSubnode();
}
How do we access the 'key' attribute here?
Metric (key = "distance") {float {1}}
Metric (key = "angle") {float {1}}
Metric (key = "time") {float {1}}
Metric (key = "up") {string {"z"}}
Metric (key = "forward") {string {"x"}}
Another example, how do we access the 'primitive' attribute here?
GeometryObject $geometry1 // Box001, Box002
{
Mesh (primitive = "triangles")
{
}
}
If there's some hidden OpenDDL polymorphism going on, then it's not being adequately explained, which is very frustrating.
Thanks for any help.