Horde3D http://horde3d.org/forums/ |
|
[solved]Bounding box issues http://horde3d.org/forums/viewtopic.php?f=2&t=1267 |
Page 1 of 1 |
Author: | reloadead [ 04.10.2010, 10:36 ] |
Post subject: | [solved]Bounding box issues |
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 |
Author: | marciano [ 04.10.2010, 21:11 ] |
Post subject: | Re: Bounding box issues |
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. |
Author: | reloadead [ 05.10.2010, 10:19 ] |
Post subject: | Re: Bounding box issues |
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 [ 161.32 KiB | Viewed 10256 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. |
Author: | Volker [ 05.10.2010, 21:51 ] |
Post subject: | Re: Bounding box issues |
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? |
Author: | reloadead [ 06.10.2010, 06:41 ] |
Post subject: | Re: Bounding box issues |
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? |
Author: | Volker [ 06.10.2010, 08:14 ] |
Post subject: | Re: Bounding box issues |
Call getNodeAABB with the handle of the mesh instead of the model. |
Author: | reloadead [ 09.10.2010, 13:12 ] |
Post subject: | Re: Bounding box issues |
Thanks, that was what I needed |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |