Horde3D
http://horde3d.org/forums/

MeshNode Local Bounding box with delayed geometry loading
http://horde3d.org/forums/viewtopic.php?f=3&t=1237
Page 1 of 1

Author:  attila [ 27.08.2010, 20:14 ]
Post subject:  MeshNode Local Bounding box with delayed geometry loading

I found that castray doesn't give back the picked node and there are some visibility issue too.
It seems that the zero sized bounding box causes these issues for me.

I found that void ModelNode::updateLocalMeshAABBs() computes the meshnode's bounding box.

It is first called when I add the scenegraph resource based node(h3dAddNodes).
void ModelNode::setGeometryRes( GeometryResource &geoRes ) calls it, _geometryRes is set, but the _meshList is empty. So the computation fails.

The second time it is called from SceneManager::updateNodes() because _nodeListDirty is true. The geometry is still unloaded. So the bounding box computation fails again.

The updateLocalMeshAABBs() is not called again. Maybe not clearing _nodeListDirty when the updateLocalMeshAABBs fails could solve the problem.

Author:  marciano [ 29.08.2010, 09:49 ]
Post subject:  Re: MeshNode Local Bounding box with delayed geometry loading

Thanks for the details. Something like what you suggest might work. It would probably make sense though to add a new _aabbDirty flag to keep the overhead low. For the future, we will probably store the AABB with the geometry.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/