Hi Theodore, Carsten and all,

On Wed, Nov 18, 2009 at 5:24 PM, Hall, Theodore <[email protected]> wrote:

> I might be off base here, but if the vertices are in a quad strip, I guess
> they should be ordered something like:
>
>   0--2--4--6
>   | /| /| /|
>   |/ |/ |/ |
>   1--3--5--7
>
> Then { p0, p1, p2 }, { p2, p3, p4 }, { p4, p5, p6 } will be counter-
> clockwise, and { p1, p2, p3 }, { p3, p4, p5 }, { p5, p6, p7 } will be
> clockwise.  I don't know whether that would affect picking, or why it
> would differ between systems.  (The algebra for intersecting a ray with
> a triangle doesn't care much about the winding order unless back-facing
> triangles are explicitly excluded.)
>

well, when I've said quad strip I actually mean a list of quads, not
triangles at all, and, another thing.. I made a mistake.. its not a strip,
it actually a list of quads with vertex repetition.. so, I iterate over each
quad safely...
The reason why I don use the quad it self and divide it in triangles is that
the api of OSG works only with triangles (getLine()->intersect( ... ) ). So,
if I have a quad, I can treat it as two triangles safely.

The main reason that lead me to believe its not my mistake is that this code
used to work before we upgrading to the lastest svn version.. (our older
version was from 02/16/2009), and it still works now under linux.

Another thing is that this particularly method setHit, which now has the
following API:

 void setHit (Real32 t,

Node *obj,

Int32 triIndex,

Vec3f &normal,

Int32 lineIndex );


has been modified since the last version we're using.. it didn't have the
lineIndex parameter... so, after that alter the code stopped working under
windows...


I can't see any possible difference between two algorithms (win x linux)..
so thats a strange problem to me.



> On the other hand, if it's supposed to be a quad strip, but the vertices
> aren't ordered correctly, then there might be empty bits between the
> triangles, as Carsten's sketch suggests.  If the strip is vertical (rather
> than horizontal as I sketched above), that might manifest itself as a
> left-right difference: both triangles with bases on the right edge and
> apexes at the left top and bottom corners, and the left edge "orphaned",
> like Carsten's sketch rotated 90 CCW.
>
>
>
my mistake, not a quad strip, a quad list..

Thanks


Pablo


>  -----Original Message-----
> From: Carsten Neumann [mailto:[email protected]]
> Sent: Wednesday, November 18, 2009 11:45
> To: [email protected]
> Subject: Re: [Opensg-users] Problem using intersectAction under Windows 32
>
> ...
>
> hm, this looks strange, assuming your p1,...,p4 are in counter clockwise
> order you are not testing the correct triangles:
>
>    p1---p4      p1               p4
>    |    |       | \            / |
>    |    |       |   \         /  |
>    p2---p3      p2---p3     p2---p3
>
>
> > But when trying to pick, only the right part of the geometry is picked,
> > but picking at the left side has no effect.. If we rotate the object,
> > the exact opposite occurs..
> >
> > The strange thing is that the problem does not occurs under linux...
>
> hm, the OS should not make a difference, strange.
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to