[vtkusers] vtk3DProp SetOrientation problem

Per Dalgas Jakobsen pdj at maridan.dk
Wed Apr 28 05:58:45 EDT 2004


(Sorry for the first posts reply-prefixes, so here I try again, less confusing without).


Hi all,

(Tested with vtk 4.2.2, but haven't found anything indicating that it have been changed in newer versions).
I ran over the following problem, and I wonder if it is working as it supposed to, or if it is in fact a bug:

----
int main(void)
{
        vtkActor *Actor = vtkActor::New();

        Actor->RotateX(45);
        // Actor->GetOrientation();
        Actor->SetOrientation(0, 0, 0);

        printf( "%f\n", Actor->GetOrientation()[0] );
}
----
Guess the result - If your guess is Zero, you're wrong, it's 45.
If you remove the double-slash (enabling the GetOrientation() command), you will get the expected result.

It seems like the Rotate commands are not updating the internal orientation variables (thats postponed until GetOrientation-kind of commands). SetOrientation is only updating the internal orientation variables if they are different from the parameters, but since the internal orientation has not been changed, they will not update at all - Effectively allowing the previous rotation to "bleed" through.

Any suggestions or comments? A bug?

Best regards
Per




More information about the vtkusers mailing list