Horde3D

Next-Generation Graphics Engine
It is currently 29.03.2024, 05:41

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 13.03.2010, 18:10 
Offline

Joined: 10.05.2009, 07:55
Posts: 30
Hi

I am not sure if this a bug or not but if understand the API correctly h3d.getCastRayResult should return some kind of handle to the intersected node. In .NET binding the node parameter of the method is not defined with out keyword. So the method is taking int parameter as input but not returning horde id of the intersected node. The API documentation for corresponding C++ method is:

DLL bool h3dGetCastRayResult(int index, H3DNode* node, float* distance, float* intersection)

Parameters

index index of result to be accessed (range: 0 to number of results returned by castRay)
node handle of intersected node
distance distance from ray origin to intersection point
intersection coordinates of intersection point (float[3] array)

Best regards,
Tommi Laukkanen


Top
 Profile  
Reply with quote  
PostPosted: 14.03.2010, 00:03 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Thanks for reporting, fixed it.


Top
 Profile  
Reply with quote  
PostPosted: 14.03.2010, 06:00 
Offline

Joined: 10.05.2009, 07:55
Posts: 30
Great, thank you :)

-tommi


Top
 Profile  
Reply with quote  
PostPosted: 14.03.2010, 16:37 
Offline

Joined: 10.05.2009, 07:55
Posts: 30
Hi

Now that I tried to use the method it seems to find the intersections correctly but when I try to access the result with h3d.getCastRayResult I get access violation with 0 index all though it found intersections and with index 1 the distance and intersection coordinates are all zero.

Should the intersection float array also have out parameter by the way?

I am using Beta4 bindings but now I should probably update to trunk to get the fix you made to the node parameter. Does this require that I build the C++ part as well from trunk?

Best regards,
Tommi Laukkanen


Top
 Profile  
Reply with quote  
PostPosted: 14.03.2010, 17:28 
Offline

Joined: 10.05.2009, 07:55
Posts: 30
I built just the bindings from trunk and things work now perfectly.

-tommi


Top
 Profile  
Reply with quote  
PostPosted: 14.03.2010, 21:31 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Yes we always patch against the trunk. The official packages are only updated when there is a new release.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 20 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:  
cron
Powered by phpBB® Forum Software © phpBB Group