NAME

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);

DESCRIPTION

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).

EXPORT

None by default.

#==============================================================================

new $view_ctl = Rinchi::CIGIPP::ViewControl->new()

Constructor for Rinchi::ViewControl.

sub packet_type()
$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.

sub packet_size()
$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.

sub view_ident([$newValue])
$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.

sub group_ident([$newValue])
$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.

sub yaw_enable([$newValue])
$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
sub pitch_enable([$newValue])
$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.

Disable   0
Enable    1
sub roll_enable([$newValue])
$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.

Disable   0
Enable    1
sub z_offset_enable([$newValue])
$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.

Disable   0
Enable    1
sub y_offset_enable([$newValue])
$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.

Disable   0
Enable    1
sub x_offset_enable([$newValue])
$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.

Disable   0
Enable    1
sub entity_ident([$newValue])
$value = $view_ctl->entity_ident($newValue);

Entity ID.

This attribute specifies the entity to which the view or view group should be attached.

sub x_offset([$newValue])
$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.

sub y_offset([$newValue])
$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.

sub z_offset([$newValue])
$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.

sub roll([$newValue])
$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.

sub pitch([$newValue])
$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.

sub yaw([$newValue])
$value = $view_ctl->yaw($newValue);

Yaw.

This attribute specifies the angle of rotation of the view or view group about its Z axis.

sub pack()
$value = $view_ctl->pack();

Returns the packed data packet.

sub unpack()
$value = $view_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.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 91:

'=item' outside of any '=over'

Around line 647:

You forgot a '=back' before '=head1'