NAME

Region2D - abstract base class for two dimensional geometric regions


SYNOPSIS

  use Region2D;


DESCRIPTION

Region2D is an abstract class to be used to construct geometric regions. It should be used only as a parent class.


Methods

The following methods must be overridden:

clone

Provide a completely independent clone of the object.

area

  $area = $obj->area

This should return the area of the object. It takes no arguments.

in

  @pdls = $obj->in( $pdl_x, $pdl_y, @other_pdls );
  @pdls = $obj->in( $pdl_x, $pdl_y, @other_pdls, \%attr );

This filters the passed piddles, returning a list of piddles containing the subset that is physically located inside the region (according to the initial $pdl_x and $pdl_y locations). The list of piddles in the same order as in the argument list.

The optional %attr hash may be used by the in method as required; at the very least it should contain and act upon the following keywords:

retxy

If true, the initial two piddles (the coordinates) should be returned along with the other piddles. If false, only the other piddles should be returned. This defaults to true.

out

  @pdls = $obj->out( $pdl_x, $pdl_y, @other_pdls );
  @pdls = $obj->out( $pdl_x, $pdl_y, @other_pdls, \%attr );

This filters the passed piddles, returning a list of piddles containing the subset that is physically located outside the region (according to the initial $pdl_x and $pdl_y locations). The list of piddles in the same order as in the argument list.

The optional %attr hash may be used by the in method as required; at the very least it should contain and act upon the following keywords:

retxy

If true, the initial two piddles (the coordinates) should be returned along with the other piddles. If false, only the other piddles should be returned. This defaults to true.


AUTHOR

Diab Jerius ( djerius@cfa.harvard.edu )


SEE ALSO

perl(1).