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);
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.
None by default.
#==============================================================================
Constructor for Rinchi::CollisionDetectionVolumeNotification.
$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.
$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.
$value = $cdv_ntc->entity_ident($newValue);
Entity ID.
This attribute indicates the entity to which the collision detection volume belongs.
$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.
$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
$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.
$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.
$value = $cdv_ntc->pack();
Returns the packed data packet.
$value = $cdv_ntc->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.