Horde3D

Next-Generation Graphics Engine
It is currently 19.04.2024, 02:45

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 04.10.2010, 10:36 
Offline

Joined: 04.09.2010, 21:42
Posts: 11
Hey all,

I've got a question when it comes to the calculation of the bounding boxes.

Currently, when I import a model that consists of several meshes (the scene file looks good) it will create one big bounding box around the entire scene, which is something I don't want and from what I understand, it's not what supposed to happen.

From what i've read (and didn't see a change in the log) it should calculate the boundingboxes from the vertstart and vertend information. Am I missing something or is this changed?

edit: I'm using the released beta 4 version


Top
 Profile  
Reply with quote  
 Post subject: Re: Bounding box issues
PostPosted: 04.10.2010, 21:11 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
I'm not sure what exactly you mean. The mesh AABBs are computed in ModelNode::updateLocalMeshAABBs and the model AABB is the union of those, updated in ModelNode::onFinishedUpdate.


Top
 Profile  
Reply with quote  
 Post subject: Re: Bounding box issues
PostPosted: 05.10.2010, 10:19 
Offline

Joined: 04.09.2010, 21:42
Posts: 11
marciano wrote:
I'm not sure what exactly you mean. The mesh AABBs are computed in ModelNode::updateLocalMeshAABBs and the model AABB is the union of those, updated in ModelNode::onFinishedUpdate.


This is probably what I need, but let me clarify myself with a picture:

Attachment:
bblol.jpg
bblol.jpg [ 161.32 KiB | Viewed 8494 times ]


As you can see, I have a model that consists of several meshes and they show up properly in the scene file. I made some simple collision with a sphere and a (bounding) box, this works all fine and stuff, but the thing is, I'm working on a small game and I want the collision to work on the bounding boxes of the meshes and I don't need the whole model for this.

So how can I execute this method to update the model to display/calculate the mesh bounding boxes?

Edit:
Ok, I figured out that appearantly, I can do this with the h3dSetNodeParamI but I can't really figure out the arguments I need to pass.. the node is obvious, but the param and value are a big questionmark to me and I can't seem to find any (ex)samples or references about it.


Top
 Profile  
Reply with quote  
 Post subject: Re: Bounding box issues
PostPosted: 05.10.2010, 21:51 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
reloadead wrote:
Ok, I figured out that appearantly, I can do this with the h3dSetNodeParamI but I can't really figure out the arguments I need to pass.. the node is obvious, but the param and value are a big questionmark to me and I can't seem to find any (ex)samples or references about it.

From what I've understood, you might search for h3dGetNodeAABB, don't you?


Top
 Profile  
Reply with quote  
 Post subject: Re: Bounding box issues
PostPosted: 06.10.2010, 06:41 
Offline

Joined: 04.09.2010, 21:42
Posts: 11
Volker wrote:
reloadead wrote:
Ok, I figured out that appearantly, I can do this with the h3dSetNodeParamI but I can't really figure out the arguments I need to pass.. the node is obvious, but the param and value are a big questionmark to me and I can't seem to find any (ex)samples or references about it.

From what I've understood, you might search for h3dGetNodeAABB, don't you?


well, if you look at the picture you can see the entire model has a boundingbox and when i call for h3dnodegetaabb I get the boundingbox of that model, but as you can see, the model consists of several meshes and I want to get the boundingbox of those meshes (the little platform).

So how do I get the boundingboxes of the induvidual meshes in my model?


Top
 Profile  
Reply with quote  
 Post subject: Re: Bounding box issues
PostPosted: 06.10.2010, 08:14 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Call getNodeAABB with the handle of the mesh instead of the model.


Top
 Profile  
Reply with quote  
 Post subject: Re: Bounding box issues
PostPosted: 09.10.2010, 13:12 
Offline

Joined: 04.09.2010, 21:42
Posts: 11
Thanks, that was what I needed :)


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

All times are UTC + 1 hour


Who is online

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