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

Home » Public Forums » archive » ROTATE MODEL
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
ROTATE MODEL [message #66592] Tue, 26 May 2009 10:43 Go to next message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Hi people,

I've 2 IDLgrImages into an IDLgrModel and I want to rotate the images
30 degrees.
I tried to use the IDLgrModel::Rotate method and I did not succeed
with the rotation.

I tried a lot of combinations:
model->rotate, [0,0,0], 30
model->rotate, [1,0,0], 30
etc..

Why the images don't rotate? grgrgggrrrr ....
How to do that ?

Thanks in advance,
nata
Re: ROTATE MODEL [message #66667 is a reply to message #66592] Wed, 27 May 2009 10:17 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
On May 27, 12:04 pm, Rick Towler <rick.tow...@nomail.noaa.gov> wrote:
> nata wrote:
>> I've a last question related with this discussion.
>> There is a way to rotate IDLgrPolyline objects ? I mean, IDlgrImage
>> has the /TRANSFORM_MODE keyword but if I use others graphics objects I
>> can't rotate them. So, if it's possible to rotate graphics objects in
>> general ?
>
> Not in the same way. Generally you only apply transformations
> (rotations, translations, etc) on models. Hence the Rotate and
> Translate methods of IDLgrModel. So if you want to rotate polyline,
> surface, or polygon objects you place them in an IDLgrModel and use its
> rotate method.
>
> IDLgrImage is different. Since images aren't comprised of polygons
> there are no vertices to transform so adding an image object to a model
> and transforming it doesn't do anything. To actually transform an image
> you have to create a planar polygon, texture map the image onto it, then
> transform this polygon. This caused much "confusion and delay" so
> RSI/ITT added the Transform_Mode keyword to IDLgrImage which does the
> hard work for you.
>
> So only IDLgrImage has (or needs) the Transform_Mode keyword. All other
> graphics objects are comprised of vertices and can be transformed via
> IDLgrModel methods.
>
> -Rick

Ok, I understand.

I see, my polyline object rotates automatically. If I want to rotate
only some objects I've to use 2 IDLgrModels. Then I could rotate some
ones and don't do anything with the others.

Thank you for your replies guys,
nata
Re: ROTATE MODEL [message #66668 is a reply to message #66592] Wed, 27 May 2009 09:04 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
nata wrote:
> I've a last question related with this discussion.
> There is a way to rotate IDLgrPolyline objects ? I mean, IDlgrImage
> has the /TRANSFORM_MODE keyword but if I use others graphics objects I
> can't rotate them. So, if it's possible to rotate graphics objects in
> general ?

Not in the same way. Generally you only apply transformations
(rotations, translations, etc) on models. Hence the Rotate and
Translate methods of IDLgrModel. So if you want to rotate polyline,
surface, or polygon objects you place them in an IDLgrModel and use its
rotate method.

IDLgrImage is different. Since images aren't comprised of polygons
there are no vertices to transform so adding an image object to a model
and transforming it doesn't do anything. To actually transform an image
you have to create a planar polygon, texture map the image onto it, then
transform this polygon. This caused much "confusion and delay" so
RSI/ITT added the Transform_Mode keyword to IDLgrImage which does the
hard work for you.

So only IDLgrImage has (or needs) the Transform_Mode keyword. All other
graphics objects are comprised of vertices and can be transformed via
IDLgrModel methods.

-Rick
Re: ROTATE MODEL [message #66669 is a reply to message #66592] Wed, 27 May 2009 08:54 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
nata wrote:
> I've a last question related with this discussion.
> There is a way to rotate IDLgrPolyline objects ? I mean, IDlgrImage
> has the /TRANSFORM_MODE keyword but if I use others graphics objects I
> can't rotate them. So, if it's possible to rotate graphics objects in
> general ?
>
> Thanks,
> nata

You should be able to rotate an IDLgrPolyline (and the other graphics
atoms except IDLgrImage) by default:

IDL> xobjview, obj_new('IDLgrPolyline', [0, 1, 1, 0, 0] - 0.5, [0, 0, 1,
1, 0] - 0.5)

What is the issue you are experiencing?

Mike
--
www.michaelgalloy.com
Associate Research Scientist
Tech-X Corporation
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: ROTATE MODEL
Next Topic: Re: ENVI DoIts

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

Current Time: Wed Oct 08 11:41:31 PDT 2025

Total time taken to generate the page: 0.00690 seconds