comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Depth visibility with Object Graphics !!!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Depth visibility with Object Graphics !!! [message #39514 is a reply to message #39477] Wed, 26 May 2004 06:17 Go to previous messageGo to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Antonio Santiago wrote:
> Sorry, but I can't obtain any good result with your ideas. I have been
> playin with DEPTH_TEST_xxx atributes but nothing, perhaps i am a
> squar-head :)
>
> I attach a little file with my problem. First i add to the model the
> "line" an then the "image". I change the values of DEPTH_TEST_FUNCTION,
> DEPTH_TEST_DISABLE and DEPTH_TEST_WRTIE but i can't do the line
> overdrawn the image.
>

I never have gotton a good feel for the DEPTH_**** keywords. Below is
a simple approach that puts the places the image on a polygon as a
texture map.

Rick pointed out that it is sometimes advantageous to transform the
whole shebang out of pixel space into real data space. This example
does just that... in fact, if the pixel size was important for your work
you could get away from the normalization and work in "raw" data
coordinates. For 2d objects graphics (usually images with ROIs and
axes) I usually don't normalize.

oImage = OBJ_NEW('IDLgrImage', img)

opolygon = OBJ_NEW('IDLgrPolygon', $
[0, 0, sizes[1]-1, sizes[1]-1], $
[0, sizes[2]-1, sizes[2]-1, 0], $
Color = [255,255,255], $
XCOORD_CONV=xnorm, YCOORD_CONV=ynorm, $
Texture_Map = oImage, $
TEXTURE_COORD = [[0,0], [1,0], [1,1], [0,1]])

oModel->Add, opolygon


oWindow->Draw, oView
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: simple question about axis
Next Topic: Re: accessing data from READ_ASCII

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 20:55:38 PDT 2025

Total time taken to generate the page: 2.00036 seconds