vtkProp3D::RotateX
allow to rotate the prop.
prop->RotateX(10); prop>RotateX(20);
would rotate the prop with 30 degree compared with the original prop.
Is there a vtkProp3D::Reset()
method which can clear the rotation status. For example:
prop->RotateX(10);
prop->Reset(); // clear the rotation status
prop->RotateX(20);
I hope the prop
rotate only 20 degree rather than 10+20 degree.
Is there a Reset
method or a similar method?
Any suggestion is appreciated~~~
Hi,
It seems that vtkProp3D
does not define a reset-like method. You could try subclassing it and adding one:
void myVtkProp3D::Reset()
{
this->IsIdentity = 1;
this->Transform->Identity();
this->Modified();
}
take care,
Paulo
Alternativelly, you can use SetOrientation()
instead of any of the Rotate*()
methods. SetOrientation()
resets the internal transform object:
prop->SetOrientation(10, 0, 0);
//prop->Reset(); // don't need to reset
prop->SetOrientation(20, 0, 0);
It looks dirty, but it would spare you a cumbersome subclassing.
regards,
Paulo