From: Angus Dorbie (dorbie++at++sgi.com)
Date: 12/05/2000 09:41:27
You say you set a strip, a strip is a single primitive with several
triangles. You may optionally have more than one triangle primitive and
set the associated lengths array when you create the geoset so, to
narrow everything down fully if you use multiple strips you need to look
at PFQHIT_PRIM and PFQHIT_TRI, the former telling you which tristrip and
the latter telling you which triangle in the strip. As things stand you
probably only have the one primitive (and a single value in lengths)
which is obviously always 0 and so PFQHIT_TRI will be the number you
need indicating which triangle in strip 0 you have hit.
Cheers,Angus.
Yigang Wang wrote:
>
> Hi, all.
>
> I am making a program to select some parts of the triangle mesh with
> Performer. I need the returned parameters of the index of strip
> primitive (PFHIT_PRIM) and the index of triangle in the strip
> (PFHIT_TRI). But it result in an error in my program. So i check the
> example program /usr/share/Performer/src/pguide/libpf/C++/intersect.C
>
> I made a small change of the programe
> /usr/share/Performer/src/pguide/libpf/C++/intersect.C, there appear an
> strange result. In the example, i change the primitive of the pfGeoSet
> (QUADS) to strips representation ( not change the real geometry), and
> then i get the result of intersection from the fuuctions:
> pfHit::query(&prim_index, PFHIT_PRIM) and pfHit::mQuery(&tri_index,
> PFHIT_TRI), I found that the prim_index is always 0. However it
> changed correctly for QUADS case or POLYS case.
>
> Is it a bug or not? Do i need to set more parameters for pfHit?
>
> Thanks for your reply.
>
> Yigang
>
>
>
>
>
>
> --
> **********************************************************************
> Yigang Wang tel: +49 (2241) 14 2980
> http://www.viswiz.gmd.de fax: +49 (2241) 14 2040
> email: yigang.wang++at++gmd.de
> GMD - The German National Research Center for Information Technology
>
>
-- For Performer+OpenGL tutorials http://www.dorbie.com/"In the middle of difficulty lies opportunity." --Albert Einstein
This archive was generated by hypermail 2b29 : Tue Dec 05 2000 - 09:41:43 PST