Re: [osg-users] Polytope - Intersections sorted by distance of localIntersectionPoint and the reference plane

2012-09-27 Thread Ron Mayer
Hi again,

After thinking about it here is what I think the answer is.
Let's say our polytope intersects two circles (or rectangles) A and B, each at 
two points
A1, A2 and
B1, B2

The center point of A1 and A2 is computed, denote by centerA12
The center point of B1 and B2 is computed, denote by centerB12

Then the distance is measured from centerA12, and centerB12 to the reference 
plane. By default the reference plane is the last plane in teh polytope - 
meaning, if the polytope is made out of 5 half-planes, the last one is the 
default reference plane (the last one, as the last one in the data structure 
the half-planes are stored).

The polytope intersector then stores the nodes sorted by the distance as 
described above.

Still need to understand what happens if one of the circles is completely 
inside the polytope, what is the order of such an object in the sorting scheme. 

Also, another question I was asking myself, was about duplicate reporting.
Let's say I have a parent and a child node both at the same location.
When the polytope intersector intersects both, are they reported as 2 different 
intersections (each having their own path, which is the same except of one 
node)? (I would say yes)

Cheers,
Ron

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=50330#50330





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Polytope - Intersections sorted by distance of localIntersectionPoint and the reference plane

2012-09-26 Thread Ron Mayer
Hi,

I am trying to understand what are
(1) distance of the localIntersectionPoint, (2) the reference plane in a 
polytope intersector, and (3) last plane of the polytope, which are used to 
sort the intersections of a Polytope intersector.

I know that a volume is created with half-planes in a polygon shape for the 
intersection volume, then the scene nodes are tested to see if they are inside 
or intersect the polytope (or outside).
During this process, a list of intersections is created sorted by the distance 
of the localIntersectionPoint and the reference plane.
also
The default for the reference plane is the last plane of the polytope

Can someone give an explanation about these?  (or explain through an example 
of, let's say, 2 lines intersecting a polytope, how will they be sorted?)

Cheers,
Ron

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=50314#50314





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org