Rinchi::CIGIPP::PositionRequest - Perl extension for the Common Image Generator Interface - Position Request data packet. data packet. =head1 SYNOPSIS
use Rinchi::CIGIPP::PositionRequest; my $pos_rqst = Rinchi::CIGIPP::PositionRequest->new(); $packet_type = $pos_rqst->packet_type(); $packet_size = $pos_rqst->packet_size(); $object_ident = $pos_rqst->object_ident(43377); $articulated_part_ident = $pos_rqst->articulated_part_ident(145); $coordinate_system = $pos_rqst->coordinate_system(Rinchi::CIGIPP->ParentEntityCS); $object_class = $pos_rqst->object_class(Rinchi::CIGIPP->EntityOC); $update_mode = $pos_rqst->update_mode(0);
The Position Request packet is used to query the IG for the current position of an entity, articulated part, view,view group, or motion tracker. This feature is useful for determining the locations of autonomous IG-driven entities, child entities and articulated parts, and view eyepoints. It can also be used for determining the instantaneous position and orientation of head trackers and other tracked input devices.
None by default.
#==============================================================================
Constructor for Rinchi::PositionRequest.
$value = $pos_rqst->packet_type();
Data Packet Identifier.
This attribute identifies this data packet as the Position Request packet. The value of this attribute must be 27.
$value = $pos_rqst->packet_size();
Data Packet Size.
This attribute indicates the number of bytes in this data packet. The value of this attribute must be 8.
$value = $pos_rqst->object_ident($newValue);
Object ID.
This attribute identifies the entity, view, view group, or motion tracking device whose position is being requested.
If Object Class is set to Articulated Part (1), this attribute specifies the entity whose part is identified by the Articulated Part ID attribute.
$value = $pos_rqst->articulated_part_ident($newValue);
Articulated Part ID.
This attribute identifies the articulated part whose position is being requested. The entity to which the part belongs is specified by the Object ID attribute. This attribute is valid only when Object Class is set to Articulated Part (1).
$value = $pos_rqst->coordinate_system($newValue);
Coordinate System.
This attribute specifies the desired coordinate system relative to which the position and orientation should be given.
Geodetic – Position will be specified as a geodetic latitude, longitude, and altitude. Orientation is given with respect to the reference plane.
Parent Entity – Position and orientation are with respect to the entity to which the specified entity or view is attached. This value is invalid for top-level entities.
Submodel – Position and orientation will be specified with respect to the articulated part's reference coordinate system. This value is valid only when Object Class is set to Articulated Part (1).
Note: If Object Class is set to Motion Tracker (3), The coordinate system is defined by the tracking device and this attribute is ignored.
GeodeticCS 0 ParentEntityCS 1 SubmodelCS 2
$value = $pos_rqst->object_class($newValue);
Object Class.
This attribute specifies the type of object whose position is being requested.
EntityOC 0 ArticulatedPartOC 1 ViewOC 2 ViewGroupOC 3 MotionTrackerOC 4
$value = $pos_rqst->update_mode($newValue);
Update Mode.
This attribute specifies whether the IG should report the position of the requested object each frame. If this attribute is set to One-Shot (0), the IG should report the position only one time.
$value = $pos_rqst->pack();
Returns the packed data packet.
$value = $pos_rqst->unpack();
Unpacks the packed data packet.
$obj_name->byte_swap();
Byte swaps the packed data packet.
Refer the the Common Image Generator Interface ICD which may be had at this URL: http://cigi.sourceforge.net/specification.php
Brian M. Ames, <bmames@apk.net>
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:
'=item' outside of any '=over'
Non-ASCII character seen before =encoding in '–'. Assuming UTF-8
You forgot a '=back' before '=head1'
To install Rinchi::CIGIPP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rinchi::CIGIPP
CPAN shell
perl -MCPAN -e shell install Rinchi::CIGIPP
For more information on module installation, please visit the detailed CPAN module installation guide.