Go::RectDomain Class Reference
['geometry' - a spline library]

Represents a rectangular parameter domain. More...

#include <RectDomain.h>

Inheritance diagram for Go::RectDomain:

Go::Domain List of all members.

Public Member Functions

 RectDomain ()
 Constructs an uninitialized domain.
 RectDomain (const Array< double, 2 > &corner1, const Array< double, 2 > &corner2)
 Constructs and defines a rectangular domain by two of its opposing corners.
virtual ~RectDomain ()
 Virtual destructor, enables safe inheritance.
virtual bool isInDomain (const Array< double, 2 > &point, double tolerance) const
 check whether a given parameter pair is located inside the domain
virtual bool isOnBoundary (const Array< double, 2 > &point, double tolerance) const
 check whether a given parameter pair is located on the domain boundary
virtual void closestInDomain (const Array< double, 2 > &point, Array< double, 2 > &clo_pt, double tolerance) const
 Find the (u, v) point in the Domain that is closest (using Euclidean distance in R^2) to a given (u, v) point.
virtual void closestOnBoundary (const Array< double, 2 > &point, Array< double, 2 > &clo_bd_pt, double tolerance) const
 Find the (u, v) point on the boundary of the Domain that is closest (using Euclidean distance in R^2) to a given (u, v) point.
void addUnionWith (const RectDomain &rd)
 Expand the RectDomain just enough to cover the RectDomain given as argument.
void intersectWith (const RectDomain &rd)
 Set 'this' RectDomain to be the intersection of its current extent and that of the argument RectDomain.
double umin () const
 Get the RectDomain's smallest value for the first parameter.
double umax () const
 Get the RectDomain's largest value for the first parameter.
double vmin () const
 Get the RectDomain's smallest value for the second parameter.
double vmax () const
 Get the RectDomain's largest value for the second parameter.
Array< double, 2 > lowerLeft () const
 Get the 'lower left' corner of this RectDomain.
Array< double, 2 > upperRight () const
 Get the 'upper right' corner of this RectDomain.

Detailed Description

Represents a rectangular parameter domain.

Definition at line 49 of file RectDomain.h.


Constructor & Destructor Documentation

Go::RectDomain::RectDomain ( const Array< double, 2 > &  corner1,
const Array< double, 2 > &  corner2 
)

Constructs and defines a rectangular domain by two of its opposing corners.

Parameters:
corner1 the first corner
corner2 the opposing corner to 'corner1'


Member Function Documentation

virtual bool Go::RectDomain::isInDomain ( const Array< double, 2 > &  point,
double  tolerance 
) const [virtual]

check whether a given parameter pair is located inside the domain

Parameters:
point the (u,v)-pair that we want to test.
tolerance the tolerance used (ruling what to do when 'point' is located very near the edge of the domain).
Returns:
'true' if 'point' is inside the domain, or within 'tolerance' from being inside the domain, 'false' otherwise'.

Implements Go::Domain.

virtual bool Go::RectDomain::isOnBoundary ( const Array< double, 2 > &  point,
double  tolerance 
) const [virtual]

check whether a given parameter pair is located on the domain boundary

Parameters:
point the (u,v)-pair that we want to test
tolerance the tolerance used (how 'far' from the boundary our (u,v) pair can be and still be considered 'on' the boundary.
Returns:
'true' if the point is considered to be on the boundary (within 'tolerance', 'false' otherwise.

Implements Go::Domain.

virtual void Go::RectDomain::closestInDomain ( const Array< double, 2 > &  point,
Array< double, 2 > &  clo_pt,
double  tolerance 
) const [virtual]

Find the (u, v) point in the Domain that is closest (using Euclidean distance in R^2) to a given (u, v) point.

If the given point is in the domain, then the answer is obviously the same point.

Implements Go::Domain.

virtual void Go::RectDomain::closestOnBoundary ( const Array< double, 2 > &  point,
Array< double, 2 > &  clo_bd_pt,
double  tolerance 
) const [virtual]

Find the (u, v) point on the boundary of the Domain that is closest (using Euclidean distance in R^2) to a given (u, v) point.

If the point is already considered on the boundary, then the answer is obviously the same point.

Implements Go::Domain.

void Go::RectDomain::addUnionWith ( const RectDomain rd  ) 

Expand the RectDomain just enough to cover the RectDomain given as argument.

Parameters:
rd the RectDomain that we want to be covered by 'this' RectDomain.

void Go::RectDomain::intersectWith ( const RectDomain rd  ) 

Set 'this' RectDomain to be the intersection of its current extent and that of the argument RectDomain.

Parameters:
rd the RectDomain that we want to intersect with 'this' one.

double Go::RectDomain::umin (  )  const [inline]

Get the RectDomain's smallest value for the first parameter.

Returns:
the RectDomain's smallest value for the first parameter

Definition at line 109 of file RectDomain.h.

double Go::RectDomain::umax (  )  const [inline]

Get the RectDomain's largest value for the first parameter.

Returns:
the RectDomain's largest value for the first parameter

Definition at line 113 of file RectDomain.h.

double Go::RectDomain::vmin (  )  const [inline]

Get the RectDomain's smallest value for the second parameter.

Returns:
the RectDomain's smallest value for the second parameter

Definition at line 117 of file RectDomain.h.

double Go::RectDomain::vmax (  )  const [inline]

Get the RectDomain's largest value for the second parameter.

Returns:
the RectDomain's largest value for the second parameter

Definition at line 121 of file RectDomain.h.

Array<double, 2> Go::RectDomain::lowerLeft (  )  const [inline]

Get the 'lower left' corner of this RectDomain.

Returns:
a 2D array containing the 'lower left' corner of this RectDomain

Definition at line 125 of file RectDomain.h.

Array<double, 2> Go::RectDomain::upperRight (  )  const [inline]

Get the 'upper right' corner of this RectDomain.

Returns:
a 2D array containing the 'upper right' corner of this RectDomain

Definition at line 129 of file RectDomain.h.


The documentation for this class was generated from the following file:
Generated on Mon Jun 11 14:48:19 2007 for GoTools Core Library by  doxygen 1.5.1