[vtkusers] vtkLinearTransform Question

naresh naresh at winner.co.in
Wed Aug 18 09:32:04 EDT 2010


Dear David

I am using vtkLinearTransform for vtkProp like this to update transformation 
in my class. Given code is just for referance .

vtkLinearTransform * vtktransform = vtkLinearTransform::New()
vtkProp3D *prop = vtkProp3D::New();

prop->SetUserTransform(vtktransform);

Using from class i am getting handle of vtkLinearTranform and I want to do 
some rotation,scale,translation stuff from this.

So if I have to do anything rotation,scale,translation i have to use 
vtkTransform correct me if i worng.

So from the class i am getting hadle like this.

vtkLinearTransform* xform = RoundNode->GetVtkTransform();

vtkTransform* t = vtkTransform::New();
t->SetInput(xform);
t->RotateZ(55);
t->Update();
 xform->Update();


So vtkTransform will change vtkLinearTransform automatically or I have to 
set anything ?




----- Original Message ----- 
From: "David Doria" <daviddoria+vtk at gmail.com>
To: "naresh" <naresh at winner.co.in>
Cc: <vtkusers at vtk.org>
Sent: Wednesday, August 18, 2010 6:26 PM
Subject: Re: [vtkusers] vtkLinearTransform Question


> On Wed, Aug 18, 2010 at 8:49 AM, naresh <naresh at winner.co.in> wrote:
>>
>> Hi
>>
>> I have vtkLinearTransform . How can i rotate,scale,translate the object ?
>>
>> vtkTransform need to be connect to pipeline but it will reflect changes 
>> in
>> vtkLinearTransform directly ?
>>
>> Likewise i have code like that. Is that correct to this way ? 
>> vtkTransform
>> will change the vtkLinearTransform using pipeline ?
>> vtkLinearTransform* xform = RoundNode->GetVtkTransform();
>>
>> vtkTransform* t = vtkTransform::New();
>> t->SetInput(xform);
>> t->RotateZ(55);
>> t->Update();
>> xform->Update();
>>
>>
>
> Please give us some context - that is, make the shortest possible
> example program that demonstrates what you are trying to/ what is
> wrong.
>
> David 





More information about the vtkusers mailing list