Adobe Director Xtra for the emagin Z800 Visor
site version: August 9, 2007
xtra version: test version 1
| General Info and Description | Requirements | Download and Install | Xtra Methods | Lingo Examples |
| Xtra Methods | |
All functions are global functions. Do not instantiate the xtra. For example do not do: (error codes will be listed later when I get a chance to make them all unique... ) z800InitDevice() and z800InitTracker() should always be called sequentially to initialise a z800 visor. You can call them more than once, though they will not actually re-init until the xtra has destroyed the visor object using z800Destroy(). It is safe to call any other function at any time, even when the visor is disconnected. |
|
| method: | z800InitDevice() |
| parameters: | no parameters |
| description: | Connects to the visor using EMADevice_DLL. Always call this first before calling any other functions of the z800 xtra. Be sure to call z800InitTracker() after calling z800InitDevice(), otherwise the visor will not be fully inited. Once a visor is inited, it should be destroyed using z800Destroy(). |
| returns: | 1 if successful, otherwise 0 or an error code integer |
| notes: | z800InitDevice() and z800InitTracker() are separate functions as a result of dev testing. Always call them together to init a z800 visor. |
| method: | z800InitTracker() |
| parameters: | no parameters |
| description: | Connects EMATracker_DLL. Always call this after calling z800InitDevice(), otherwise the visor will not be fully inited. Once a visor is inited, it should be destroyed using z800Destroy(). |
| returns: | 1 if successful, otherwise 0 or an error code integer |
| notes: | z800InitDevice() and z800InitTracker() are separate functions as a result of dev testing. Always call them together to init a z800 visor. |
| method: | z800Destroy() |
| parameters: | no parameters |
| description: | Disconnect the z800 visor. Always call before disconnecting the visor from USB or before the program quits. |
| returns: | 1 for a disconnected visor, otherwise 0 or an error code integer. 1 should always be returned, even when there is no visor connected to USB. |
| notes: | |
| method: | z800SetCenter() |
| parameters: | no parameters |
| description: | Center the visor tracking at its current position. Call this when the visor appears to drift off-course. |
| returns: | 1 if successful, otherwise 0 |
| notes: | |
| method: | z800GetData() |
| parameters: | no parameters |
| description: | Returns a linear list of raw data obtained from the headset. Call this at frequent (>= 30 millisecond) lingo timeout intervals. The list is always in the following format, regardless of the visor connection state: [vector_PYR, vector_ACCEL, vector_ANGV, float_North, int_ErrorCode] where vector_PYR is a vector defining the pitch, yaw, and roll of the visor (in radians). can be used to determine the rotation of a Director 3D scene camera. vector_ACCEL is a vector defining the translational acceleration of the visor vector_ANGV is a vector defining the angular velocity of the visor float_North is the raw data North value int_ErrorCode is an error code integer. If 1, headset is connected ok and data is valid. Otherwise an error code; the data in the list will not be valid. |
| returns: | a lingo linear list as described above. |
| notes: | The translational acceleration values could theoretically be used to calculate absolute position. However these values returned from the visor are always a bit "noisy", and filtering would have to be applied for this to work. I don't know what purpose the values north and angular velocity would serve, but the visor emits them so I return them. |
| method: | z800CycleBrightness() |
| parameters: | no parameters |
| description: | Cycle the brightness level of the visor display through its 5 levels of brightness. |
| returns: | 1 if successful, otherwise 0 |
| notes: | |
| method: | z800EnableExternalMonitor(isEnable) |
| parameters: | pass a boolean to enable (TRUE) or disable (FALSE) |
| description: | Enables or disables an external monitor connected to the visor. |
| returns: | 1 if successful, otherwise 0 |
| notes: | Emagin documentation states this is useful/needed when using laptop setups. |
| method: | z800EnableStereoVision(isEnable) |
| parameters: | pass a boolean to enable (TRUE) or disable (FALSE) |
| description: | Attempt to enable or disable 3D stereo vision on the visor. |
| returns: | 1 if successful, otherwise 0 or an error code |
| notes: | Visor light will turn green when 3D stereo is actve, and amber when inactive. |
| method: | z800ToggleLeftRightDisplays() |
| parameters: | no parameters |
| description: | Toggle left and right 3D stereo eyes. |
| returns: | 1 if successful, otherwise 0 |
| notes: | Usually, this is not needed in Director because it can be done through switching cameras with lingo. |
| method: | z800SetTrackerPollingPeriod(intPollPeriodMs) |
| parameters: | pass an integer >= 30 |
| description: | Sets the Tracker polling period in milliseconds. |
| returns: | 1 if successful, otherwise 0 or an error code |
| notes: | Usually you won't need to set this, because the default polling period is set to the fastest (hardware limit) of 30 milliseconds when z800InitTracker() is called. Note that this Tracker polling period is the period the Tracker DLL uses to poll the visor, not the lingo timeout polling value. |
| method: | z800GetTrackerPollingPeriod() |
| parameters: | no parameters |
| description: | Gets the Tracker polling period in milliseconds. |
| returns: | Tracker current polling period in milliseconds >= 30, otherwise 0 for failure |
| notes: | |
|
-------- z800KeepAliveOne() z800GetDataOne() |
![]()