The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Rinchi::CIGIPP::CollisionDetectionVolumeNotification - Perl extension for the Common Image Generator Interface - Collision Detection Volume Notification data packet. data packet. =head1 SYNOPSIS

  use Rinchi::CIGIPP::CollisionDetectionVolumeNotification;
  my $cdv_ntc = Rinchi::CIGIPP::CollisionDetectionVolumeNotification->new();

  $packet_type = $cdv_ntc->packet_type();
  $packet_size = $cdv_ntc->packet_size();
  $entity_ident = $cdv_ntc->entity_ident(16373);
  $volume_ident = $cdv_ntc->volume_ident(83);
  $collision_type = $cdv_ntc->collision_type(Rinchi::CIGIPP->CollisionEntity);
  $contacted_entity_ident = $cdv_ntc->contacted_entity_ident(36408);
  $contacted_volume_ident = $cdv_ntc->contacted_volume_ident(60);

DESCRIPTION

The Collision Detection Volume Notification packet is used to notify the Host when a collision occurs between two collision detection volumes. Volumes belonging to the same entity are not tested against each other.

The IG sends a Collision Detection Volume Notification packet for each volume involved in a collision. For instance, if two volumes collide, two Collision Detection Volume Notification packets will be sent. If a collision occurs that involves three volumes, a total of six Collision Detection Volume Notification packets will be sent.

Unlike with collision detection segment testing, where the result is a single point, the result of a collision detection volume test is the geometric intersection of two volumes. This intersection is usually an irregular volume with many vertices; therefore, the collision response data contains no spatial information describing the intersection.

Because collision detection volume testing does not involve polygon surfaces, no material code is returned with the collision response data.

Note that collision detection testing is performed every frame by the IG. If a collision detection volume has been disabled, it will be excluded from all collision testing.

EXPORT

None by default.

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

new $cdv_ntc = Rinchi::CIGIPP::CollisionDetectionVolumeNotification->new()

Constructor for Rinchi::CollisionDetectionVolumeNotification.

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

Data Packet Identifier.

This attribute identifies this data packet as the Collision Detection Volume Notification packet. The value of this attribute must be 114.

sub packet_size()
 $value = $cdv_ntc->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 entity_ident([$newValue])
 $value = $cdv_ntc->entity_ident($newValue);

Entity ID.

This attribute indicates the entity to which the collision detection volume belongs.

sub volume_ident([$newValue])
 $value = $cdv_ntc->volume_ident($newValue);

Volume ID.

This attribute indicates the ID of the collision detection volume within which the collision occurred.

This attribute, along with Entity ID, allows the Host to match this response with the corresponding request.

sub collision_type([$newValue])
 $value = $cdv_ntc->collision_type($newValue);

Collision Type.

This attribute indicates whether the collision occurred with another entity or with a non-entity object such as the terrain.

    CollisionNonEntity   0
    CollisionEntity      1
sub contacted_entity_ident([$newValue])
 $value = $cdv_ntc->contacted_entity_ident($newValue);

Contacted Entity ID.

This attribute indicates the entity with which the collision occurred.

If Collision Type is set to Non-entity (0), this attribute is ignored.

sub contacted_volume_ident([$newValue])
 $value = $cdv_ntc->contacted_volume_ident($newValue);

Contacted Volume ID.

This attribute indicates the ID of the collision detection volume with which the collision occurred.

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

Returns the packed data packet.

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

'=item' outside of any '=over'

Around line 374:

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