You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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...
Properties like 'key' and 'primitive' are stored in members of the structures to which they belong. For example, the MetricStructure class has a string member called metricKey, and it holds the value of the 'key' property for that structure. Similarly, the MeshStructure class has a member called meshPrimitive.
Ok, but these members are private, and i see no 'get' functions to retrieve them. I was under the impression that all the information I needed was retrievable, but it seems now I have to hack into it and add my own 'get' functions. If I misunderstand,
then please show a single code of line that demonstrates how to retrieve these data from the structure, without having to modify the OpenGEX library as it stands.
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...
}
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.
The text was updated successfully, but these errors were encountered: