User talk:Bsmithson
Actor orientation
Hello,
I have a model with a line. It is defined between two points.
If I have another line between the origin and say (80,0,0) and I want to set the actor orientation to match the previous one, I thought all I would need to do was to get the direction cosines of the unit vector which points from the original line's pt1 to pt2, and then I would have the angles that I would apply to the new line. But this doesn't work.
I came across something in the VTK Textbook saying that orientation was applied in Z, then X, then Y. Is that also how the transform filter works?
I am looking for a way to take the orientation from a vector between 2 points and to use that to mate up another object to that line. The line represents an axis of rotation and I want the next link in the kinematic change to align with it. The set of calculations I would ordinarily use to line them up doesn't seem to work. Is this because the rotations are in Z, X, and Y order? Are the Actor Orientation andles Euler angles? What do I need to do to convert between angles resulting from direction cosines to actor orientation angles?
- Bonnie