SpaceBall/SpaceMouse Devices
Supported SpaceBall or SpaceMouse devices.
HyperMesh, HyperView, HyperGraph 2D, HyperGraph 3D, and MotionView now support the following SpaceBall or SpaceMouse devices from 3Dconnexion: SpaceNavigator, SpacePilot, SpaceExplorer and SpaceTraveler.
Before running the application, be sure that current drivers are installed for your device. The applications automatically detect and enable the use of the SpaceBall/SpaceMouse once the device is connected and working properly.
The 6 degrees-of-freedom input on the SpaceMouse devices require no special configuration prior to using it within the product, however the 3Dconnexion control panel may be used to adjust the sensitivity of the device, as well as how the axes respond to input.
Button Event Number | Function |
---|---|
1 | Top View |
2 | Left View |
3 | Right View |
4 | Front View |
5 | Fit View |
6 | ISO View |
7-10 | View Memory Buttons |
11-16 | User defined Tcl callbacks |
17-29 | These buttons cannot be customized within the applications because they are supported across various platforms (Windows, Linux, and so on). |
Custom Button Handler
SpaceMouse button events 11 - 16 are programmed to call user defined Tcl callback handlers. These allow you to customize the SpaceMouse functionality to meet your needs.
Button | Description |
---|---|
GetSpaceballButtonMin() | Returns the minimum button event ID that can be programmed with a Tcl callback. |
GetSpaceballButtonMax() | Returns the maximum button event ID that can be programmed with a Tcl callback. |
RegisterSpaceballCallback (buttonID, procName) |
Registers a Tcl callback
against the specified button event ID. The callback procedure
takes a state parameter, which is the state of the button at the
time the event has occurred. True - indicates the button was pressed. False - indicates the button has been released. |
Example
proc ::FlipAnim { state } {
# Only respond to button events, which occurs when state == "True"
if {$state == "False"} {
return;
}
hwi OpenStack;
set t [lindex [split [expr rand()] .] end];
catch {
hwi GetSessionHandle sess$t;
sess$t GetProjectHandle proj$t;
proj$t GetPageHandle page$t [proj$t GetActivePage ];
if {"false" == [page$t IsAnimating] } {
page$t StartAnimation;
} else {
page$t StopAnimation;
}
}
hwi CloseStack;
}
set t [lindex [split [expr rand()] .] end];
hwi GetSessionHandle sess$t
set buttonID [sess$t GetSpaceballButtonMin];
sess$t RegisterSpaceballCallback $buttonID ::FlipAnim;
sess$t ReleaseHandle;