NAME
Rinchi::CIGIPP::MotionTrackerControl - Perl extension for the Common Image Generator Interface - Motion Tracker Control data packet. data packet. =head1 SYNOPSIS
use Rinchi::CIGIPP::MotionTrackerControl;
my $mt_ctl = Rinchi::CIGIPP::MotionTrackerControl->new();
$packet_type = $mt_ctl->packet_type();
$packet_size = $mt_ctl->packet_size();
$view_ident = $mt_ctl->view_ident(10606);
$tracker_ident = $mt_ctl->tracker_ident(122);
$yaw_enable = $mt_ctl->yaw_enable(Rinchi::CIGIPP->Enable);
$pitch_enable = $mt_ctl->pitch_enable(Rinchi::CIGIPP->Enable);
$roll_enable = $mt_ctl->roll_enable(Rinchi::CIGIPP->Disable);
$z_enable = $mt_ctl->z_enable(Rinchi::CIGIPP->Enable);
$y_enable = $mt_ctl->y_enable(Rinchi::CIGIPP->Disable);
$x_enable = $mt_ctl->x_enable(Rinchi::CIGIPP->Enable);
$boresight_enable = $mt_ctl->boresight_enable(Rinchi::CIGIPP->Disable);
$tracker_enable = $mt_ctl->tracker_enable(Rinchi::CIGIPP->Disable);
$view_group = $mt_ctl->view_group(Rinchi::CIGIPP->View);
DESCRIPTION
The Motion Tracker Control packet is used to initialize and change properties of tracked input devices connected to the IG. These devices may include head trackers, eye trackers, wands, trackballs, etc. If more than one head tracker is used to control a view or view group, the order in which the transformations are applied is determined by the IG.
The Host may request the instantaneous position and orientation of a tracker device by sending a Position Request packet with its Object Class attribute set to Motion Tracker (4).
Note that if tracked input devices are connected to the Host, the Host should interpret the tracked input data and send the appropriate CIGI packets to achieve the desired effect on the IG. For example, the Host would interpret input from a connected head tracker and send View Control packets to the IG to move the eyepoint of the appropriate view or view group.
EXPORT
None by default.
#==============================================================================
- new $mt_ctl = Rinchi::CIGIPP::MotionTrackerControl->new()
-
Constructor for Rinchi::MotionTrackerControl.
- sub packet_type()
-
$value = $mt_ctl->packet_type();
Data Packet Identifier.
This attribute identifies this data packet as the Motion Tracker Control packet. The value of this attribute must be 18.
- sub packet_size()
-
$value = $mt_ctl->packet_size();
Data Packet Size.
This attribute indicates the number of bytes in this data packet. The value of this attribute must be 8.
- sub view_ident([$newValue])
-
$value = $mt_ctl->view_ident($newValue);
View/View Group ID.
This attribute specifies the view or view group to which the tracking device is attached.
- sub tracker_ident([$newValue])
-
$value = $mt_ctl->tracker_ident($newValue);
Tracker ID.
This attribute specifies the tracker whose state the data in this packet represents.
- sub yaw_enable([$newValue])
-
$value = $mt_ctl->yaw_enable($newValue);
Yaw Enable.
This attribute is used to enable or disable the yaw (Z-axis rotation) of the motion tracker.
Disable 0 Enable 1
- sub pitch_enable([$newValue])
-
$value = $mt_ctl->pitch_enable($newValue);
Pitch Enable.
This attribute is used to enable or disable the pitch (Y-axis rotation) of the motion tracker.
Disable 0 Enable 1
- sub roll_enable([$newValue])
-
$value = $mt_ctl->roll_enable($newValue);
Roll Enable.
This attribute is used to enable or disable the roll (X-axis rotation) of the motion tracker.
Disable 0 Enable 1
- sub z_enable([$newValue])
-
$value = $mt_ctl->z_enable($newValue);
Z Enable.
This attribute is used to enable or disable the Z-axis position of the motion tracker.
Disable 0 Enable 1
- sub y_enable([$newValue])
-
$value = $mt_ctl->y_enable($newValue);
Y Enable.
This attribute is used to enable or disable the Y-axis position of the motion tracker.
Disable 0 Enable 1
- sub x_enable([$newValue])
-
$value = $mt_ctl->x_enable($newValue);
X Enable.
This attribute is used to enable or disable the X-axis position of the motion tracker.
Disable 0 Enable 1
- sub boresight_enable([$newValue])
-
$value = $mt_ctl->boresight_enable($newValue);
Boresight Enable.
This attribute is used to set the boresight state of the external tracking device. This mode is used to reestablish the tracker's “center” position at the current position and orientation.
Note: If boresighting is enabled, the Host must send a Motion Tracker Control packet with Boresight Enable set to Disable (0) to return the tracker to normal operation. The IG will continue to update the boresight position each frame until that occurs.
Disable 0 Enable 1
- sub tracker_enable([$newValue])
-
$value = $mt_ctl->tracker_enable($newValue);
Tracker Enable.
This attribute specifies whether the tracking device is enabled.
Disable 0 Enable 1
- sub view_group([$newValue])
-
$value = $mt_ctl->view_group($newValue);
View/View Group Select.
This attribute specifies whether the tracking device is attached to a single view or a view group. If set to View (0), the View/View Group ID attribute identifies a single view. If set to View Group (1), that attribute identifies a view group.
View 0 ViewGroup 1
- sub pack()
-
$value = $mt_ctl->pack();
Returns the packed data packet.
- sub unpack()
-
$value = $mt_ctl->unpack();
Unpacks the packed data packet.
- sub byte_swap()
-
$obj_name->byte_swap();
Byte swaps the packed data packet.
SEE ALSO
Refer the the Common Image Generator Interface ICD which may be had at this URL: http://cigi.sourceforge.net/specification.php
AUTHOR
Brian M. Ames, <bmames@apk.net>
COPYRIGHT AND LICENSE
Copyright (C) 2009 by Brian M. Ames
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6 or, at your option, any later version of Perl 5 you may have available.
3 POD Errors
The following errors were encountered while parsing the POD:
- Around line 87:
'=item' outside of any '=over'
- Around line 391:
Non-ASCII character seen before =encoding in '“center”'. Assuming UTF-8
- Around line 569:
You forgot a '=back' before '=head1'