<ismxray@yahoo.com> wrote in message
news:1105675017.122783.122310@c13g2000cwb.googlegroups.com.. .
> I try to visualize a 3D data and following the help files like this:
> .....
> myviewer->Add,myModel
> myModel->Add,myVolume
> myModel->rotate,[1,1,1],50
> .....
> After a few steps, How could I rotate it back to the original states?
You could use the IDLgrModel::Reset method to go back to the identity
matrix, but then you would lose other transforms that you may have put
there, like scaling. If you do have other transforms, you could try putting
all but the rotation in one model, and then use another model just for the
rotations.
or
You could:
< set up graphics tree and set transforms >
myModel->GetProperty, TRANSFORM=t
myModel->Rotate,[1,1,1],50
myModel->Rotate,[1,1,1],50
myModel->Rotate,[1,1,1],50
myModel->Rotate,[1,1,1],50
myModel->Rotate,[1,1,1],50
myModel->Rotate,[1,1,1],50
myModel->Rotate,[1,1,1],50
myModel->Rotate,[1,1,1],50
myModel->SetProperty, TRANSFORM=t
to put you back to the state before doing the rotations.
Karl
|