Horde3D

Next-Generation Graphics Engine
It is currently 19.04.2024, 03:06

All times are UTC + 1 hour




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 19.01.2008, 08:00 
Offline

Joined: 16.01.2008, 00:24
Posts: 73
Location: Canada/Quebec
Ive just discovered a bug with Horde3DUtils::pickNode. The value returned returned by this function when a node is slectioned is always a unity higher than it supposed to be.

For example, if I create a Node in wich the NodeHandle value is equal to 75, the value returned by the pickNode function will be 76 if I click on it.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 20.01.2008, 22:49 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Strange, we are using this function in the HordeEditor and and didn't notice any problems so far. Nevertheless I will check it again.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 24.01.2008, 03:03 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
I couldn't find any problem, but I only did a quick test. Are you sure there is a bug?

Please be aware of the fact the pickNode function returns handles to meshes and not to models.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 24.01.2008, 03:16 
Offline

Joined: 16.01.2008, 00:24
Posts: 73
Location: Canada/Quebec
Code:
NodeHandle nodeTemp = (Horde3DUtils::pickNode(normMouseX, normMouseY ) - 1);


I'm using this to get the right nodeHandle. Maybe I could send you the source code? The comment are in french, but every classes and variable names are in english. It's my attemp to make a little map editor.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 24.01.2008, 11:31 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
A sample with source would really help.

And no worries about the French, I used to speak it quite well (a plenty of years ago, when I was still in school ;) )


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 25.01.2008, 02:37 
Offline

Joined: 16.01.2008, 00:24
Posts: 73
Location: Canada/Quebec
Hi!

I did not knew the difference between model and mesh in horde, but I have looked more carefully at knight material and ive seen that a model can be composed by many mesh. So, its surely not a bug. My error is that I was trying to compare a model and a mesh.

Is there a way to get an NodeHandle from a mesh wich is in a model? Ive tried with Horde3D::getNodeChild but it did not work.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 25.01.2008, 12:34 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Getting the model to which a mesh belongs is easy. Just call getParent starting at that mesh in a while loop until you get a node of the type model.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 26.01.2008, 21:55 
Offline

Joined: 16.01.2008, 00:24
Posts: 73
Location: Canada/Quebec
Thanks, it work well now :D


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 17 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