octreeLine.getIntersections() causes compile error in OF 1.7.x
I'm trying to do some simple shadowing in openFOAM using ray-casting. Obviously, I'd rather use the built in octree classes to speed this process up rather than doing a brute force check of every patch face against the points I want to get shading data for. To this end I tried to impliment the octreeLine class with it's getIntersections() method, (http://foam.sourceforge.net/doc/Doxy...ctreeLine.html) to get a list of the cells intersected by a given line.
I followed the exact same setup as shown on octreeLine's Doxygen page but whenever I compile I get all kinds of errors that look like they reside in the base OF code. (See attachment for the output)
Has anyone successfully used this method or is this a bug in the code? Thanks!
After a night's rest I found the problem.
The pointHitSort class didn't have a " < " operator defined in pointHitSort.H, the std::sort algorithm needs this to sort the intersections the lineSearch finds.
If you add the following to pointHitSort.H everything compiles fine...
i also want to include some ray-casting in OF. Up to now I used some brute force searching with findcell. Have you been successful with using getintersections and is it possible to get some more information on your implementation (or at best some code snippets)?
Basically my implementation is the same as one outlined on the Doxygen page for the octreeLine class...
There's not much more to it than that. The built in octree classes are quite fast and I've had some good results working with it.
thanks for the quick answer. How do you generate those octrees? Up to now I don't have any experience in working with octree-classes and there is merely any discussion on this topic in the forum.
|All times are GMT -4. The time now is 14:33.|