NAME

Rinchi::CIGIPP::LineOfSightResponse - Perl extension for the Common Image Generator Interface - Line Of Sight Response data packet. data packet. =head1 SYNOPSIS

use Rinchi::CIGIPP::LineOfSightResponse;
my $los_resp = Rinchi::CIGIPP::LineOfSightResponse->new();

$packet_type = $los_resp->packet_type();
$packet_size = $los_resp->packet_size();
$request_ident = $los_resp->request_ident(23176);
$host_frame_number_lsn = $los_resp->host_frame_number_lsn(15);
$visible = $los_resp->visible(Rinchi::CIGIPP->Occluded);
$entity_ident_valid = $los_resp->entity_ident_valid(Rinchi::CIGIPP->Invalid);
$valid = $los_resp->valid(Rinchi::CIGIPP->Invalid);
$response_count = $los_resp->response_count(68);
$entity_ident = $los_resp->entity_ident(9383);
$range = $los_resp->range(45.403);

DESCRIPTION

The Line of Sight Response packet is used in response to both the Line of Sight Segment Request and Line of Sight Vector Request packets. This packet contains the distance from the Line of Sight (LOS) segment or vector source point to the point of intersection with a polygon surface. The packet is sent when the Request Type attribute of the request packet is set to Basic (0).

A Line of Sight Response packet will be sent for each intersection along the LOS segment or vector. The Response Count attribute will contain the total number of responses that are being returned. This will allow the Host to determine when all response packets for the given request have been received.

If the Update Period attribute of the originating Line of Sight Segment Request or Line of Sight Vector Request packet was set to a value greater than zero, then the Host Frame Number LSN attribute of each corresponding Line of Sight Response packet must contain the least significant nybble of the Host Frame Number value last received by the IG before the range is calculated. The Host may correlate this LSN to an eyepoint position or may use the value to determine latency.

EXPORT

None by default.

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

new $los_resp = Rinchi::CIGIPP::LineOfSightResponse->new()

Constructor for Rinchi::LineOfSightResponse.

sub packet_type()
$value = $los_resp->packet_type();

Data Packet Identifier.

This attribute identifies this data packet as the Line of Sight Response packet. The value of this attribute must be 104.

sub packet_size()
$value = $los_resp->packet_size();

Data Packet Size.

This attribute indicates the number of bytes in this data packet. The value of this attribute must be 16.

sub request_ident([$newValue])
$value = $los_resp->request_ident($newValue);

LOS ID.

This attribute identifies the LOS response. This value corresponds to the value of the LOS ID attribute in the associated Line of Sight Segment Request packet or Line of Sight Vector Request packet.

sub host_frame_number_lsn([$newValue])
$value = $los_resp->host_frame_number_lsn($newValue);

Host Frame Number LSN.

This attribute contains the least significant nybble of the Host Frame Number attribute of the last IG Control packet received before the LOS data are calculated. This attribute is ignored if the Update Period attribute of the corresponding Line of Sight Segment Request or Line of Sight Vector Request packet was set to zero (0).

sub visible([$newValue])
$value = $los_resp->visible($newValue);

Visible.

This attribute is used in response to a Line of Sight Segment Request packet. It indicates whether the destination point is visible from the source point.

This value should be ignored if the packet is in response to a Line of Sight Vector Request packet.

Note: If the LOS segment destination point is within the body of a target entity model, this attribute will be set to Occluded (0) and the Entity ID attribute will contain the ID of that entity.

Occluded   0
Visible    1
sub entity_ident_valid([$newValue])
$value = $los_resp->entity_ident_valid($newValue);

Entity ID Valid.

This attribute indicates whether the LOS test vector or segment intersects with an entity (Valid) or a non-entity (Invalid).

Invalid   0
Valid     1
sub valid([$newValue])
$value = $los_resp->valid($newValue);

Valid.

This attribute indicates whether the Range attribute is valid. The range will be invalid if no intersection occurs, or if an intersection occurs before the minimum range or beyond the maximum range specified in a LOS vector request.

Invalid   0
Valid     1
sub response_count([$newValue])
$value = $los_resp->response_count($newValue);

Response Count.

This attribute indicates the total number of Line of Sight Response packets the IG will return for the corresponding request.

Note: If Visible is set to Visible (1), then Response Count should be set to 1.

sub entity_ident([$newValue])
$value = $los_resp->entity_ident($newValue);

Entity ID.

This attribute indicates the entity with which an LOS test vector or segment intersects. This attribute should be ignored if Entity ID Valid is set to Invalid (0).

sub range([$newValue])
$value = $los_resp->range($newValue);

Range.

This attribute indicates the distance along the LOS test segment or vector from the source point to the point of intersection with a polygon surface.

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

Returns the packed data packet.

sub unpack()
$value = $los_resp->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 87:

'=item' outside of any '=over'

Around line 463:

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