[vtkusers] aboat SetOrigin and SetPosition
yin wei
yinw_2002 at hotmail.com
Thu Dec 7 23:00:02 EST 2006
I counter a problem:In my project , I want to rotate a model around any
points which I set as a parameter manually.I do it successfully in one
progam file use vtkActor's menber founctins such as 'SetOrigin' and
'SetPosition' like this:
float center[3];
float bounds[6];
objActor->GetBounds(bounds);
center[0]=0.5*(bounds[0]+bounds[1]);
center[1]=0.5*(bounds[2]+bounds[3]);
center[2]=0.5*(bounds[4]+bounds[5]);
objActor->SetOrigin(center);
objActor->SetPosition(-center[0],-center[1],-center[2]);
But I am failed in another project with the above code.
How can I do it ? And what do 'Origin' or 'Position' mean set by
'SetOrigin' or 'SetPosition'?
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
More information about the vtkusers
mailing list