Horde3D

Next-Generation Graphics Engine
It is currently 22.11.2024, 17:30

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 06.11.2010, 12:30 
Offline

Joined: 29.10.2010, 14:28
Posts: 46
Location: Hungary
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?


Top
 Profile  
Reply with quote  
PostPosted: 07.11.2010, 11:03 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
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.


Top
 Profile  
Reply with quote  
PostPosted: 08.11.2010, 17:10 
Offline

Joined: 29.10.2010, 14:28
Posts: 46
Location: Hungary
Thank You for the quick answer.
I solved the problem, I parse the scene file
myself.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 35 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group