Hello,
For reason of complex model parts I have started to replace my NodeCore sharing strategy by usage of the VisitSubTree core. Unfortunately, now I have problems with the intersection action code. On applying my scene to a IntersectAction instance I get a hit for my visited geometry. That is fine. However, on evaluation of the intersection hit I do not know in which one of the VisitSubTree branches the intersection actually occurred (provided that I have multiple VisitSubTrees for the same geometry). What I would like to do, is the following: 1. Derive a new IntersectAction class from IntersectAction. 2. virtually override the setHit function. 3. provide enter and leave callbacks for the VisitSubTree core which basically delegate to the VisitSubTree implementation but perform a little housekeeping with respect to the VisitSubTree carrying node. 4. On an actual winning hit event, remember the current VisitSubTree carrying node if any. In case that this scheme does work in theory the following principle show stoppers exists: a) the setHit function is not virtual declared in IntersectAction. b) a derived class from IntersectAction does not have access to the _hit* state. c) providing extra enter and leave callbacks does not allow delegation inside their implementation since the intersectEnter methods of the NodeCores are declared in the protected section. So basically, I have the following questions: - Are there any other known ideas for intersection with VisitSubTree shared sub scenes, i.e. for finding the actual VisitSubTree carrying node for the winning intersection? - Is there any support for designing the IntersectAction more customizable? - How can this best be done? - Does my approach have apparent flaws which I do not see, but you? :-) Any help is very appreciated. Best, Johannes ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users