Rinchi::CIGIPP::ShortArticulatedPartControl - Perl extension for the Common Image Generator Interface - Short Articulated Part Control data packet. data packet. =head1 SYNOPSIS
use Rinchi::CIGIPP::ShortArticulatedPartControl; my $sap_ctl = Rinchi::CIGIPP::ShortArticulatedPartControl->new(); $packet_type = $sap_ctl->packet_type(); $packet_size = $sap_ctl->packet_size(); $entity_ident = $sap_ctl->entity_ident(15419); $articulated_part_ident1 = $sap_ctl->articulated_part_ident1(124); $articulated_part_ident2 = $sap_ctl->articulated_part_ident2(21); $articulated_part_enable2 = $sap_ctl->articulated_part_enable2(Rinchi::CIGIPP->Enable); $articulated_part_enable1 = $sap_ctl->articulated_part_enable1(Rinchi::CIGIPP->Disable); $dof_select2 = $sap_ctl->dof_select2(Rinchi::CIGIPP->NotUsed); $dof_select1 = $sap_ctl->dof_select1(Rinchi::CIGIPP->XOffset); $degree_of_freedom1 = $sap_ctl->degree_of_freedom1(2.007); $degree_of_freedom2 = $sap_ctl->degree_of_freedom2(49.352);
The Short Articulated Part Control packet is provided as a lower-bandwidth alternative to the Articulated Part Control packet. It can be used when manipulation of only one or two degrees of freedom of a submodel is necessary.
This packet allows for up to two articulations. The articulations may be applied to a single articulated part or two separate ones belonging to the same entity. The articulated part or parts are specified by the Articulated Part ID 1 and Articulated Part ID 2 attributes. Two floating-point degree-of-freedom attributes, DOF 1 and DOF 2, specify offsets or angular positions for the specified articulated parts. The DOF Select 1 and DOF Select 2 attributes specify which degree of freedom each of these floating-point attributes represents. Note: If DOF Select 1 and DOF Select 2 refer to the same degree of freedom for the same articulated part, then DOF 2 (i.e., the "last-in" value) takes priority over DOF 1.
None by default.
#==============================================================================
Constructor for Rinchi::ShortArticulatedPartControl.
$value = $sap_ctl->packet_type();
Data Packet Identifier.
This attribute identifies this data packet as the Short Articulated Part Control packet. The value of this attribute must be 7.
$value = $sap_ctl->packet_size();
Data Packet Size.
This attribute indicates the number of bytes in this data packet. The value of this attribute must be 16.
$value = $sap_ctl->entity_ident($newValue);
Entity ID.
This attribute specifies the entity to which the articulated part(s) belongs.
$value = $sap_ctl->articulated_part_ident1($newValue);
Articulated Part ID 1.
This attribute specifies one of up to two articulated parts to which the data in this packet should be applied. When used with the Entity ID attribute, this attribute uniquely identifies a particular articulated part within the scene graph. The value of this attribute may be equal to that of Articulated Part ID 2.
$value = $sap_ctl->articulated_part_ident2($newValue);
Articulated Part ID 2.
This attribute specifies one of up to two articulated parts to which the data in this packet should be applied. When used with the Entity ID attribute, this attribute uniquely identifies a particular articulated part within the scene graph. The value of this attribute may be equal to that of Articulated Part ID 1.
$value = $sap_ctl->articulated_part_enable2($newValue);
Articulated Part Enable 2.
This attribute determines whether the articulated part submodel specified by Articulated Part ID 2 should be enabled or disabled within the scene graph. If this attribute is set to Disable (0), the part is removed from the scene; if the attribute is set to Enable (1), the part is included in the scene.
Disable 0 Enable 1
$value = $sap_ctl->articulated_part_enable1($newValue);
Articulated Part Enable 1.
This attribute determines whether the articulated part submodel specified by Articulated Part ID 1 should be enabled or disabled within the scene graph. If this attribute is set to Disable (0), the part is removed from the scene; if the attribute is set to Enable (1), the part is included in the scene.
$value = $sap_ctl->dof_select2($newValue);
DOF Select 2.
This attribute specifies the degree of freedom to which the value of DOF 2 is applied. If this attribute is set to Not Used (0), both DOF 2 and Articulated Part Enable 2 are ignored.
NotUsed 0 XOffset 1 YOffset 2 ZOffset 3 Yaw 4 Pitch 5 Roll 6
$value = $sap_ctl->dof_select1($newValue);
DOF Select 1.
This attribute specifies the degree of freedom to which the value of DOF 1 is applied. If this attribute is set to Not Used (0), both DOF 1 and Articulated Part Enable 1 are ignored.
$value = $sap_ctl->degree_of_freedom1($newValue);
DOF 1.
This attribute specifies either an offset or an angular position for the part identified by Articulated Part ID 1.
The application of this value is determined by the DOF Select 1 attribute. If the attribute is set to X Offset (1), Y Offset (2), or Z Offset (3), then DOF 1 specifies an offset in meters. If DOF Select 1 is set to Yaw (4), Pitch (5), or Roll (6), then DOF 1 specifies an angular position in degrees.
$value = $sap_ctl->degree_of_freedom2($newValue);
DOF 2.
This attribute specifies either an offset or an angular position for the part identified by Articulated Part ID 2.
The application of this value is determined by the DOF Select 2 attribute. If the attribute is set to X Offset (1), Y Offset (2), or Z Offset (3), then DOF 2 specifies an offset in meters. If DOF Select 2 is set to Yaw (4), Pitch (5), or Roll (6), then DOF 2 specifies an angular position in degrees.
$value = $sap_ctl->pack();
Returns the packed data packet.
$value = $sap_ctl->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.
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
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.