Re: IDLgrWindow Pickdata on an IDLexObjView Obect. [message #25387 is a reply to message #25385] |
Mon, 11 June 2001 13:38  |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
Hi Don,
"Don J Lindler" <lindler@rockit.gsfc.nasa.gov> wrote ...
> Does anyone have any suggestions on how to get the correct 3-D position
> using the Pickdata method for an IDLgrWindow object which is displaying an
> IDLexObjView. Pickdata correctly finds the objects but returns incorrect
> x,y,z values. I am trying to modify xplot3d.pro to return the x,y, and z
> coordinates of a IDLgrPolyline displayed using Orbs for each datapoint.
I've used this a lot, with good results. I'm not sure where you are calling
the PickData from, but here is one point to note. You should either:
1) call PickData passing the primitive graphic object itself, retrieved
using Select:
oSel = oWindow -> Select(oView, [event.x, event.y]) ; returns object array
IF Size(oSel, /TName) EQ 'OBJREF' THEN BEGIN ; no selection returns -1
pick = oWindow-> PickData(oView, oSel[0], [event.x, event.y], dataXYZ)
ENDIF
or:
2) call PickData passing the "innermost" model that contains the object
directly (note: in an IDLexObjView, it is that view's oModel3 that
contains added non-stationary objects, and this model can only be
accessed inside a method of IDLexObjView or a subclass of it.
IDLexObjView::Update is a good place to use this)
"self" would be the instance of IDLexObjView:
pick = oWindow -> PickData(self, self.oModel3, [event.x, event.y], dataXYZ)
Hope this helps!
Cheers,
--
-Dick
Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
|
|
|