Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

Arroyo::rectangular_region Class Reference

#include <region_base.h>

Inheritance diagram for Arroyo::rectangular_region:

Arroyo::region_base List of all members.

Public Member Functions

 rectangular_region ()
 rectangular_region (const rectangular_region &rec_region)
 rectangular_region (const vector< three_point > &in_corners)
 rectangular_region (const three_frame &tf, vector< long > axes, double pix)
 rectangular_region (const rectangular_region &rec_region, const three_vector &nrml, bool along_nrml)
 rectangular_region (const rectangular_region &rec_region, double pix)
 ~rectangular_region ()
rectangular_regionoperator= (const rectangular_region &rec_region)
bool aligned (const rectangular_region &rec_region) const
bool contains (const rectangular_region &rec_region) const
bool is_contained (const rectangular_region &rec_region) const
bool is_disjoint (const rectangular_region &rec_region) const
vector< three_pointget_corners () const
three_point get_center () const
void print (ostream &os, const char *prefix="", long precision=6) const
void print (ostream &os, const three_frame &tf, const char *prefix="", long precision=6) const

Friends

rectangular_region region_union (const rectangular_region &rec_region1, const rectangular_region &rec_region2)
rectangular_region region_intersection (const rectangular_region &rec_region1, const rectangular_region &rec_region2)
bool operator== (const rectangular_region &rec_region1, const rectangular_region &rec_region2)

Detailed Description

A class to specify a 2d rectangular region in space


Constructor & Destructor Documentation

Arroyo::rectangular_region::rectangular_region  )  [inline]
 

Null constructor

Arroyo::rectangular_region::rectangular_region const rectangular_region rec_region  ) 
 

Copy constructor

Arroyo::rectangular_region::rectangular_region const vector< three_point > &  in_corners  ) 
 

Construct from four three_points, which must be coplanar and form a rectangular region

Arroyo::rectangular_region::rectangular_region const three_frame tf,
vector< long >  axes,
double  pix
 

Construct from a three_frame, a set of axes, and a pixel scale

Arroyo::rectangular_region::rectangular_region const rectangular_region rec_region,
const three_vector nrml,
bool  along_nrml
 

Construct from another rectangular region by projecting it onto a plane with normal vector nrml. The normal vector must be orthogonal to one of the two transverse vectors defined by the sides of the rectangle in order for the projected area to be itself rectangular. If this is not the case, an error is thrown.

The bool along_nrml determines whether the projection is carried out along the three_vector nrml, or along the vector normal to the rectangular region.

If the projection is carried out along the three_vector nrml, the resulting rectangular region is smaller than the original. This method is used to find the rectangular region that covers a foreshortened aperture.

If the projection is carried out along the normal to the rectangular region, the resulting rectangular region is larger than the original. This method is used to find the rectangular region of a wavefront projected onto an optic.

In both cases, the new rectangular region has the same center as the original.

Constructing a rectangular region with along_nrml==false and then using that region to construct another with along_nrml==true yields the original region.

Arroyo::rectangular_region::rectangular_region const rectangular_region rec_region,
double  pix
 

Construct from another rectangular_region so that the resulting rectangular_region has dimensions evenly divisible by pix. This constructor rounds the dimensions of the rectangular_region up to get the smallest possible rectangular region. The center of the original rectangular region is preserved

Arroyo::rectangular_region::~rectangular_region  )  [inline]
 

Destructor


Member Function Documentation

bool Arroyo::rectangular_region::aligned const rectangular_region rec_region  )  const
 

Determine whether this rectangular region is aligned with rec_region. Aligned means that the axes defined by the edges of the rectangles must match.

bool Arroyo::rectangular_region::contains const rectangular_region rec_region  )  const
 

Determine whether this region contains rec_region. This rectangular_region and rec_region must be aligned

three_point Arroyo::rectangular_region::get_center  )  const
 

Returns the center point of this region

vector<three_point> Arroyo::rectangular_region::get_corners  )  const
 

Returns the three_points that identify this region

bool Arroyo::rectangular_region::is_contained const rectangular_region rec_region  )  const
 

Determine whether this region is contained by rec_region. This rectangular_region and rec_region must be aligned

bool Arroyo::rectangular_region::is_disjoint const rectangular_region rec_region  )  const
 

Determine whether this region has no overlap with rec_region. This rectangular_region and rec_region must be aligned

rectangular_region& Arroyo::rectangular_region::operator= const rectangular_region rec_region  ) 
 

Operator =

void Arroyo::rectangular_region::print ostream &  os,
const three_frame tf,
const char *  prefix = "",
long  precision = 6
const [virtual]
 

Print

Implements Arroyo::region_base.

void Arroyo::rectangular_region::print ostream &  os,
const char *  prefix = "",
long  precision = 6
const [virtual]
 

Print

Implements Arroyo::region_base.


Friends And Related Function Documentation

bool operator== const rectangular_region rec_region1,
const rectangular_region rec_region2
[friend]
 

Operator ==

rectangular_region region_intersection const rectangular_region rec_region1,
const rectangular_region rec_region2
[friend]
 

Return the rectangular_region of largest size that is contained by both of the rectangular regions supplied as arguments. rec_region1 and rec_region2 must be aligned

rectangular_region region_union const rectangular_region rec_region1,
const rectangular_region rec_region2
[friend]
 

Return the rectangular_region of smallest size that contains both rectangular regions supplied as arguments. rec_region1 and rec_region2 must be aligned


The documentation for this class was generated from the following file:
Generated on Thu Nov 29 17:16:36 2007 for arroyo by  doxygen 1.3.9.1