poI3DViewCtrl SetOrientation
Sets the orientation of the model within the view.
Syntax
viewControl_handle SetOrientation "Tx Ty Tz E1 E2 E3"
Or
viewControl_handle SetOrientation "<named_views>"
Application
HyperView Tcl Modify
Description
Sets the orientation of the model within the view. Six floats are required: three for the translation of the model in X, Y, and Z, and three Euler angles for the rotation about the Z, X, Z axes.
This command is valid for both the orthographic projection and perspective projection modes.
Inputs
- Tx, Ty, Tz
- Translation of the model in X, Y, and Z.
- E1, E2, E3
- Euler angles for the rotation of the model about Z, X, Z axes.
Example
To copy just the model orientation from one window to another:
Note: This example assumes
that the same model is loaded in two side-by-side
windows.
hwi OpenStack;
variable t [expr rand()];
catch {
hwi GetSessionHandle sess$t;
sess$t GetProjectHandle proj$t;
proj$t GetPageHandle page$t [proj$t GetActivePage];
page$t GetWindowHandle win1$t 1;
page$t GetWindowHandle win2$t 2;
win1$t GetViewControlHandle vc1$t;
win1$t GetClientHandle post1$t;
win2$t GetViewControlHandle vc2$t;
win2$t GetClientHandle post2$t;
set orientation [vc1$t GetOrientation];
vc2$t SetOrientation "$orientation";
puts stdout {Orientation Set}
# Setting named views
Vc1$t SetOrientation front
Vc1$t SetOrientation back
Vc1$t SetOrientation left
Vc1$t SetOrientation right
Vc1$t SetOrientation top
Vc1$t SetOrientation bottom
Vc1$t SetOrientation iso
Vc1$t SetOrientation previous
post2$t Draw;
}
hwi CloseStack;
Error
This command should not return any errors. If the argument is invalid, nothing will be added to the selection set.