Rinchi::CIGIPP::ViewControl - Perl extension for the Common Image Generator Interface - View Control data packet. data packet. =head1 SYNOPSIS
use Rinchi::CIGIPP::ViewControl; my $view_ctl = Rinchi::CIGIPP::ViewControl->new(); $packet_type = $view_ctl->packet_type(); $packet_size = $view_ctl->packet_size(); $view_ident = $view_ctl->view_ident(11410); $group_ident = $view_ctl->group_ident(132); $yaw_enable = $view_ctl->yaw_enable(Rinchi::CIGIPP->Enable); $pitch_enable = $view_ctl->pitch_enable(Rinchi::CIGIPP->Enable); $roll_enable = $view_ctl->roll_enable(Rinchi::CIGIPP->Enable); $z_offset_enable = $view_ctl->z_offset_enable(Rinchi::CIGIPP->Disable); $y_offset_enable = $view_ctl->y_offset_enable(Rinchi::CIGIPP->Enable); $x_offset_enable = $view_ctl->x_offset_enable(Rinchi::CIGIPP->Disable); $entity_ident = $view_ctl->entity_ident(22744); $x_offset = $view_ctl->x_offset(14.225); $y_offset = $view_ctl->y_offset(68.843); $z_offset = $view_ctl->z_offset(19.148); $roll = $view_ctl->roll(53.063); $pitch = $view_ctl->pitch(75.147); $yaw = $view_ctl->yaw(45.894);
The View Control packet is used to attach a view or view group to an entity and to define the position and rotation of the view relative to the entity's reference point. Views can be positioned to correspond to the pilot eye, weapon/sensor viewpoints, and stealth view cameras.
Multiple views may be combined to form one or more view groups. This allows more than one view to be moved in unison with a single View Control packet. A view group is identified by the Group ID attribute. Operations performed upon a view group affect all views in that group. If Group ID is set to zero (0), the packet is applied to an individual view, identified by the View ID attribute.
The order of operation for views and view groups is the same as that for entities. A view is first translated along the entity's X, Y, and Z axes. After it is translated, the view is rotated about the eyepoint. The order of rotation is first about Z axis (yaw), then the Y axis (pitch), and finally the X axis (roll).
None by default.
#==============================================================================
Constructor for Rinchi::ViewControl.
$value = $view_ctl->packet_type();
Data Packet Identifier.
This attribute identifies this data packet as the View Control packet. The value of this attribute must be 16.
$value = $view_ctl->packet_size();
Data Packet Size.
This attribute indicates the number of bytes in this data packet. The value of this attribute must be 32.
$value = $view_ctl->view_ident($newValue);
View ID.
This attribute specifies the view to which the contents of this packet should be applied. This value is ignored if the Group ID attribute contains a non-zero value.
$value = $view_ctl->group_ident($newValue);
Group ID.
This attribute specifies the view group to which the contents of this packet are applied. If this value is zero (0), the packet is applied to the individual view specified by the View ID attribute. If this value is non-zero, the packet is applied to the specified view group and the View ID attribute is ignored.
$value = $view_ctl->yaw_enable($newValue);
Yaw Enable.
This attribute determines whether the Yaw attribute should be applied to the specified view or view group. If this flag is set to Disable (0), the Yaw attribute is ignored.
Disable 0 Enable 1
$value = $view_ctl->pitch_enable($newValue);
Pitch Enable.
This attribute determines whether the Pitch attribute should be applied to the specified view or view group. If this flag is set to Disable (0), the Pitch attribute is ignored.
$value = $view_ctl->roll_enable($newValue);
Roll Enable.
This attribute determines whether the Roll attribute should be applied to the specified view or view group. If this flag is set to Disable (0), the Roll attribute is ignored.
$value = $view_ctl->z_offset_enable($newValue);
Z Offset Enable.
This attribute determines whether the Z Offset attribute should be applied to the specified view or view group. If this flag is set to Disable (0), the Z Offset attribute is ignored.
$value = $view_ctl->y_offset_enable($newValue);
Y Offset Enable.
This attribute determines whether the Y Offset attribute should be applied to the specified view or view group. If this flag is set to Disable (0), the Y Offset attribute is ignored.
$value = $view_ctl->x_offset_enable($newValue);
X Offset Enable.
This attribute determines whether the X Offset attribute should be applied to the specified view or view group. If this flag is set to Disable (0), the X Offset attribute is ignored.
$value = $view_ctl->entity_ident($newValue);
Entity ID.
This attribute specifies the entity to which the view or view group should be attached.
$value = $view_ctl->x_offset($newValue);
X Offset.
This attribute specifies the position of the view eyepoint along the X axis of the entity specified by the Entity ID attribute.
$value = $view_ctl->y_offset($newValue);
Y Offset.
This attribute specifies the position of the view eyepoint along the Y axis of the entity specified by the Entity ID attribute.
$value = $view_ctl->z_offset($newValue);
Z Offset.
This attribute specifies the position of the view eyepoint along the Z axis of the entity specified by the Entity ID attribute.
$value = $view_ctl->roll($newValue);
Roll.
This attribute specifies the angle of rotation of the view or view group about its X axis after yaw and pitch have been applied.
$value = $view_ctl->pitch($newValue);
Pitch.
This attribute specifies the angle of rotation of the view or view group about its Y axis after yaw has been applied.
$value = $view_ctl->yaw($newValue);
Yaw.
This attribute specifies the angle of rotation of the view or view group about its Z axis.
$value = $view_ctl->pack();
Returns the packed data packet.
$value = $view_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.