Dirk Reiners wrote: > Hi Marcus, > > Marcus Lindblom wrote: >> Hi, >> >> So, VisitSubTree works fine, but IntersectAction probably needs some >> work in order to show the correct path. >> >> Nevertheless, what I mostly need is the actual to-world transform of the >> intersected node, not necessarily the entire path from root to node. >> (Although it might be handy to have as well...)
[snip] >> If so, how should I go about patching that? Either just grab the >> transform and add get-function for it (similar to Point/Object/Normal) >> or is there some better way? > > I would propose to add an optional feature to keep track of the path to the > base > Action. So whenever a node is pushed/popped the Action keeps track of it, if > the > application wants it, and just exposes it as a const std::vector<Node*>&. If > the > tracking is active the IntersectAction would have to copy it on intersect. This actually seems to be the easiest path. I didn't know that the actual Line object inside the IntersectAction was transformed back and forth all the time. (I feel numerical precision alarms going off, but it doesn't seem to be a big problem...) Either one would change that, to have the original line all the time and just update the to-world matrix on entering transform cores, or add two extra functions that pushes/pops nodes on each node. Can I do that by just registering extra functions for NodeCore? Or do I need to rework the Action itself? > Then we would need some helper functions that do useful things on lists of > Nodes, like calculate the accumulated matrix, but it would cover more general > cases than just storing the transform. I can do at least that one if we get to that part. :) Cheers, /Marcus ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
