Hi
Thank alex for such good help. It worked. I was thinking such vtk way to do
that from 2 days. I had also done using this code but your code is better.
Mapper::Pointer mapper = RoundNode->GetMapper(BaseRenderer::Standard3D);
BaseVtkMapper3D*
vtkmapper3d=dynamic_cast<BaseVtkMapper3D*>(mapper.GetPointer());
if(vtkmapper3d != NULL)
{
vtkProp3D* prop =
dynamic_cast<vtkProp3D*>(vtkmapper3d->GetVtkProp(BaseRenderer::GetInstance(m_RenderView3D->GetRenderWindow())));
if(prop)
{
prop->RotateZ(55);
prop->SetPosition(-1,0,0);
}
}
----- Original Message -----
From: "Alexander Seitel" <[email protected]>
To: "naresh" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, August 19, 2010 1:51 PM
Subject: Re: [mitk-users] 3D surface rotation,scale,translation
> Hi Naresh,
>
> you can use the ExecuteOperation method of Geometry3D
> (http://docs.mitk.org/nightly-qt4/classmitk_1_1Geometry3D.html#0fcfa2dca52aaa865ef950bf52affc26)
>
> (which you can easily get from your surface)
>
> For rotation e.g. the following code should work:
>
> RotationOperation* op = new RotationOperation(OpROTATE, newCenter,
> rotationAxis, rotationAngle);
> geometry->ExecuteOperation(op);
> delete op;
>
> For translation you can use a PointOperation with operation type OpMOVE.
> For scaling you use OpSCALE.
>
> Alex
>
> On Thu, 2010-08-19 at 09:37 +0200, naresh wrote:
>> Hi
>>
>> I am loading 3D STL surface in mitk. I want to do some operation like
>> rotation,scale,translation on DataNode or may be on Surface but i didn't
>> find proper way to do that.
>>
>> Any one suggest me how to do that ?
>>
>> Naresh
>>
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by
>>
>> Make an app they can't live without
>> Enter the BlackBerry Developer Challenge
>> http://p.sf.net/sfu/RIM-dev2dev
>> _______________________________________________
>> mitk-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users