home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Updates / Perl / Non-RPC / Docs / RISCOS-Library-Docs / BBox.pm < prev    next >
Text File  |  1999-04-17  |  2KB  |  60 lines

  1. NAME
  2.     RISCOS::BBox -- functions to compute relationships between
  3.     bounding boxes
  4.  
  5. SYNOPSIS
  6.         use RISCOS::BBox qw(union intersect);
  7.         @bbox = union (\@thing, \@other);
  8.         @problems = intersect \@dinsdale, \@plan, \@other_plan, \@other_other_plan
  9.  
  10.  
  11. DESCRIPTION
  12.     This module provides functions to compute relationships between
  13.     rectangular bounding boxes, which are always passed as
  14.     references to four value arrays. They are primarily of use when
  15.     processing Drawfiles with `Do' or `Change'
  16.  
  17.   union
  18.  
  19.     `union' returns the union of the bounding boxes passed to it as
  20.     array references. In scalar context it returns a reference to
  21.     the union bounding box array, in array context the array itself.
  22.  
  23.   Spatial Relationships
  24.  
  25.     All other subroutines are identical in calling conventions. The
  26.     first argument is a box to test against, and all other arguments
  27.     generate true or false values if they match or fail the named
  28.     criterion. In scalar context only the second argument is checked
  29.     against the reference, in array context a list of true/false
  30.     corresponding to the arguments is returned
  31.  
  32.     intersect
  33.         True if the bounding box intersects the reference box. False
  34.         if the bounding box is entirely within or outside the
  35.         reference, or touches it without crossing it.
  36.  
  37.     intersect_or_touching
  38.         True if the bounding box intersects or touches the reference
  39.         box.
  40.  
  41.     inside
  42.         True if the bounding box is entirely inside the reference
  43.         box (without touching).
  44.  
  45.     inside_or_touching
  46.         True if no part of the bounding box is outside the reference
  47.         box.
  48.  
  49.     outside
  50.         True if the bounding box is entirely outside the reference
  51.         box (without touching).
  52.  
  53.  
  54. BUGS
  55.     Not tested enough yet.
  56.  
  57. AUTHOR
  58.     Nicholas Clark <nick@unfortu.net>
  59.  
  60.