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

Home » Public Forums » archive » missing a dimension in IDLgrVolume
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
missing a dimension in IDLgrVolume [message #33976] Wed, 12 February 2003 00:32
Thomas Gutzler is currently offline  Thomas Gutzler
Messages: 44
Registered: November 2002
Member
Hey,

can anybody tell me, what I'm doing wrong ?
I'm comparing the code for 2 hours now and I don't get it.
Seems to having lost the z-dimension :(
I can rotate the Volume only in 1 dimension but I really need the
others, too!

here we go (requires IDLexRotator):

PRO TDVol_Event, event
WIDGET_CONTROL, event.top, Get_UValue=info
IF (*info).Rotator->Update(event) THEN $
(*info).oWindow->Draw, (*info).View
END

PRO TDVol_Cleanup, tlb
WIDGET_CONTROL, tlb, Get_UValue=info
OBJ_DESTROY, (*info).View
OBJ_DESTROY, (*info).oWindow
OBJ_DESTROY, (*info).Rotator
OBJ_DESTROY, (*info).volume
PTR_FREE, info
END

PRO vol_test
image_size=200
tmp = BYTSCL(dist(image_size))
images = BYTARR(image_size, image_size, 10)
FOR i=0,9 DO images[*,*,i] = tmp

View = OBJ_NEW('IDLgrView', Viewplane_Rect=[-image_size/2.0, $
-image_size/2.0, image_size, image_size])
RotMod = OBJ_NEW('IDLgrModel')
Rotator = OBJ_NEW('IDLexRotator', [-image_size/2.0, $
-image_size/2.0], image_size/2)
volume = OBJ_NEW('IDLgrVolume', images, $
XCOORD_CONV=[-image_size/2.0, 1], $
YCOORD_CONV=[-image_size/2.0, 1], /NO_COPY)

View->Add, Rotator
Rotator->Add, RotMod
RotMod->Add, volume

TLB = WIDGET_BASE()
drawID = WIDGET_DRAW(TLB, XSize=image_size, YSize=image_size, $
/button_events, /motion_events, graphics_level=2)

WIDGET_CONTROL, TLB, /Realize
WIDGET_CONTROL, drawID, Get_Value=oWindow
oWindow->Draw, View

info = PTR_NEW({ View:View, oWindow:oWindow, $
Rotator:Rotator, volume:volume})

WIDGET_CONTROL, TLB, Set_UValue=info
XMANAGER, 'TDVol_Viewer', TLB, EVENT_HANDLER='TDVol_Event', $
CLEANUP='TDVol_Cleanup', /NO_BLOCK
END
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: License options when starting IDL
Next Topic: Instance drawing + IDLgrVolume

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

Current Time: Wed Oct 08 13:17:42 PDT 2025

Total time taken to generate the page: 0.00442 seconds