Horde3D
http://horde3d.org/forums/

Resource parsing with Beta4
http://horde3d.org/forums/viewtopic.php?f=2&t=1300
Page 1 of 1

Author:  anchor [ 06.11.2010, 12:30 ]
Post subject:  Resource parsing with Beta4

Hello!

I want to parse the loaded resource, but I don't know how :)
The scene file is:
Code:
<Model name="cube" geometry="models/cube/cube.geo">
   <Mesh name="cube" material="models/cube/cube.material.xml" batchStart="0" batchCount="36" vertRStart="0" vertREnd="19" />
</Model>


The source code is:
Code:
H3DRes unitRes = h3dAddResource( H3DResTypes::SceneGraph, filepath, 0 );
h3dutLoadResourcesFromDisk( _contentDir );


The resource is loaded successfully. The code below is always returns with zero:
Code:
h3dGetResElemCount(unitRes,H3DResTypes::SceneGraph);
h3dGetResElemCount(unitRes,H3DNodeTypes::Mesh);
h3dGetResElemCount(unitRes,H3DNodeTypes::Model);


There is no scenegraph, no mesh, and no model in the resource?
Then how can I parse it?

Author:  marciano [ 07.11.2010, 11:03 ]
Post subject:  Re: Resource parsing with Beta4

Hi, the h3dGetResElemCount/Param functions take an H3D[...]Res enum as input, for example H3DTexRes. Unfortunately there is no enum yet for scene graph resources. However, once you have added the scene graph resource to the scene, you can easily iterate over the child nodes and query the node type and node params.

Author:  anchor [ 08.11.2010, 17:10 ]
Post subject:  Re: Resource parsing with Beta4

Thank You for the quick answer.
I solved the problem, I parse the scene file
myself.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/