Picking wrong feature from shape file

classic Classic list List threaded Threaded
4 messages Options
lmanchwari lmanchwari
Reply | Threaded
Open this post in threaded view
|

Picking wrong feature from shape file

Hi

I am using osgEarth::IntersectionPicker for picking the feature attribute of a shape file (the shape files that contain lines and points).
Sometime it’s not picking the object that are under the mouse cursor, but picking the second or third nearest object from mouse cursor.

I am using the osgEarth 2.7.

Thanks
Lalit
remoe remoe
Reply | Threaded
Open this post in threaded view
|

Re: Picking wrong feature from shape file

Hi

Try to use the latest master with RTT Picker.

Cheers,
Remo Eichenberger, Switzerland, @crocomer
lmanchwari lmanchwari
Reply | Threaded
Open this post in threaded view
|

Re: Picking wrong feature from shape file

Hi,

Thanks Remo!

What are the osg operations need to perform,for manually picking a feature attribute using RTTPicker? i would like like to be able to perform multiple picking operations from within my program, not triggered by the user's mouse events (I would like to perform picking operation in same frame by passing x, y position).

Thanks
Lalit
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Picking wrong feature from shape file

Lalit,

The RTTPicker is asynchronous by nature. You can invoke it manually with the pick(camera, mouseX, mouseY, callback) function but it will invoke the callback on a future frame.
Glenn Waldron / Pelican Mapping