Hi,

Sorry to jump in here but strangley I have just written, in the past few days, 
my own class (as Robert suggested) to do HOT calculations for the very reasons 
you are doing them.

The reason for the email is to suggest that you also might want to consider 
using the new ability to stop intersection testing on the first hit. I found 
setting this value made a measurable improvement to performance. In my case I 
am certain there will only be one intersection with my terrain so continuing 
with any further tests just wastes compute resources.

Cheers,

Brad

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Torben 
Dannhauer
Sent: Tuesday, 19 July 2011 4:20 PM
To: [email protected]
Subject: Re: [osg-submissions] osgSim::HeightAboveTerrain

Hi Robert,


> 
> Thread safety is the key reason behind not using a static cache.
> 

Oops I missed that point :)



> 
> The other solutions would be to pass in the DatabaseCacheReadCallback
> to the static method so that it could be used by the intersection
> traversal so enable the intersection to keep reusing the cache.
> 


Yes, sounds good. I'll build my "TerrainQuery" class with support for HAT and 
HOT. To avoid the extra calculations for HOT I'll refactor 
computeIntersections(..) function.

Thanks for your help,

Torben



Thank you!

Cheers,
Torben

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41461#41461





_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org


-------------------------------------------------------------------------
DISCLAIMER: This e-mail transmission and any documents, files and 
previous e-mail messages attached to it are private and confidential.  
They may contain proprietary or copyright material or information that 
is subject to legal professional privilege.  They are for the use of 
the intended recipient only.  Any unauthorised viewing, use, disclosure, 
copying, alteration, storage or distribution of, or reliance on, this 
message is strictly prohibited.  No part may be reproduced, adapted or 
transmitted without the written permission of the owner.  If you have 
received this transmission in error, or are not an authorised recipient, 
please immediately notify the sender by return email, delete this 
message and all copies from your e-mail system, and destroy any printed 
copies.  Receipt by anyone other than the intended recipient should not 
be deemed a waiver of any privilege or protection.  Thales Australia 
does not warrant or represent that this e-mail or any documents, files 
and previous e-mail messages attached are error or virus free.  

-------------------------------------------------------------------------

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to