poIImagePlane SetAssociatedModelID
Associates the image plane with the specified model.
Syntax
Imageplane_handle SetAssociatedModelID id
Application
HyperView Tcl Modify
Description
When a tracking system is created and made active, it can be desirable for a 3D image plane to follow the tracking system. This command identifies which model, if any, the image plane should follow. This setting is only relevant if the image plane is in 3D mode, and if there is an active tracking system on that model. A value of -1 indicates no model is associated with the image plane.
Inputs
- id
- A valid model ID.
Example
# Assumes the LS-Dyna Bumper model is loaded
hwi OpenStack
if {[catch {
hwi GetSessionHandle session_handle
session_handle GetProjectHandle project_handle
project_handle GetPageHandle page_handle [project_handle GetActivePage]
page_handle GetWindowHandle window_handle [page_handle GetActiveWindow]
window_handle GetClientHandle client_handle
client_handle GetImagePlaneCtrlHandle ipc_handle
set ipid2 [ipc_handle AddImagePlane Video1]
ipc_handle GetImagePlaneHandle imageplane_handle $ipid2
imageplane_handle SetFileName g:/samples2/VideoOverlay/video1.jpg
imageplane_handle SetMode background
imageplane_handle ReleaseHandle
client_handle GetModelHandle model 1
set tsid [model AddTrackingSystem];
model GetTrackingSystemHandle ts_handle $tsid;
ts_handle SetNode "1 189 @ 1 2 1 188";
model SetActiveTrackingSystem $tsid;
ipc_handle GetImagePlaneHandle imageplane_handle $ipid2
imageplane_handle SetCullAngle 70
imageplane_handle SetMode 3D
imageplane_handle SetAssociatedModelID 1
client_handle Draw
} result]} {
global errorInfo;
puts stderr $result;
puts "[session_handle GetError]";
puts stderr "*** Tcl TRACE ***";
puts stderr $errorInfo;
} else {
puts "No errors.";
puts "Warnings: ";
puts " [session_handle GetError]";
}
hwi CloseStack
Errors
Returns HW_InvalidHandle if the image plane handle is invalid.