Hi Andrew,
Andrew Cunningham schrieb:
Hi,
I am having some problems with the "distance" found by the PolytopeIntersector
but only when the geometry I am trying to pick has a non-null (Matrix)Transform in it's
parent.
The PolytopeIntersector registers that object as a 'hit', BUT the distance
recorded appears to be incorrect ( the end result is I end up 'highlighting'
the wrong object behind the object I want to pick).
The intersection calculation works perfectly (with the transformed object) but the distance to the reference plane (used for sorting the intersections) does not accurately reflect the expected distance. Just to re-iterate this. As long as I do not try to pick a node with a transform, the sorting of the PolytopeIntersector works as expected....
I had a look at the code but could not spot any obvious flaws.
The Matrix-Transforms are handled in the method
PolytopeIntersector::clone() and the reference-plane is
transformed in sync with the Polytope.
Using the "LineSegmentIntersector" on the same scene does not show the issue.
It correctly sorts the intersections.
Any ideas?
Do your transformations have a scaling component?
Thanks
Andrew
Cheers
Peter
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier,
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org