Re: How can I use pfChanPick() for using a mouse to select geometry?

New Message Reply Date view Thread view Subject view Author view

Luis Veigas (lfveigas++at++yahoo.com)
Thu, 23 Sep 1999 03:34:39 -0700 (PDT)


> Thank you for looking at my question!
> I find function pfChanPick() can help use a
> mouse to select geometry.
> But I don't know how to use it. Can you tell me? A
> sample will be best,
> thanks!
>
> ZhouTian

Hi, I'm new at the Info-Performer list!
This is my first message!

In response to Zhou Tian, there's how you can use
PfChanPick:

  picked = pfChanPick(channel, flags, x, y, radius,
                      pick);

Arguments:
              picked -> number of picked objects

           x -> x coordinate of the mouse in the window
                     (between 0.0f and 1.0f)

           y -> y coordinate of the mouse in the window
                        (between 0.0f and 1.0f)

               flags -> maybe PFTRAV_IS_PRIM|PFPK_M_NEAREST
                 
           radius -> maybe 0.0f
         
           pick -> a pfHit structure to contain the
                        returned data: pfHit **pick[32]

Then, you just have to use the pfQueryHit function to
get the data you want. For example, if you want to get
the geode clicked by the mouse pointer, just use:

        pfQueryHit(pick[0][0], PFQHIT_NODE, &geode)

where geode is a pfGeode structure: pfGeode *geode.

Ok, that's it.
I hope it helps you!
Bye.

=====
. _/ _/_/_/ _/ _/ ++=========================++
   _/ _/ _/ _/ || Luis Filipe Veigas ||
  _/ _/_/ _/ _/ || Software Engineer ||
 _/ _/ _/ _/ || lfveigas++at++yahoo.com ||
_/_/_/ _/ _/_/ || Portugal ||
                                ++=========================++
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu Sep 23 1999 - 03:38:03 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.