On Mar 17, 2015, at 4:49 PM, benson chepkwony <bchepk...@att.net> wrote:

> I am currently working on ray tracing optimization and in particular. I am 
> dealing with Ray packets and coherency. And I am not sure about all these 
> files:
> 
> I am not sure which data structure is used to traverse the BVH or the Nurbs 
> surfaces.

Benson,

That’s a little complicated and it’s unclear from your message what you’re 
referring to exactly.  There is the overarching spatial partitioning traversal 
that happens for all ray tracing, all entity types, happening in 
src/librt/shoot.c (see rt_shootray() and rt_advance_to_next_cell() in 
particular).  There is also specialized BVH traversal happening when a ray 
encounters a specific primitive type for some complex types (e.g., a polygonal 
mesh or a NURBS object).  For those, see their implementation in 
src/librt/primitives/*/* particularly the rt_*_prep() and rt_*_shot() functions.

This might also help as a very oversimplified minimal raytracing front-end 
application that shoots a single ray:  
http://brlcad.org/wiki/Example_Application

Cheers!
Sean



------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to