Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Arak::QueryPointIndex::RecolorQuadrilateralFunction Class Reference

#include <query_point.hpp>

List of all members.


Detailed Description

This functor is used to recolor all query points inside a quadrilateral region (that is not necessarily convex).

For efficiency this functor represents such quadrilaterals as the union or difference between two triangles.

Definition at line 241 of file query_point.hpp.

Public Member Functions

 RecolorQuadrilateralFunction (const Geometry::Triangle &t1, const Geometry::Triangle &t2)
 Constructor.

void operator() (const QueryPoint &q)
 Recolors the supplied query point if it lies in the closure of the quadrilateral.


Private Attributes

const Geometry::Trianglet1
 A pointer to the first triangle used to represent the quadrilateral; it must consist of any three of the quadrilateral's vertices.

const Geometry::Trianglet2
 A pointer to the second triangle used to represent the quadrilateral; it must have two adjacent vertices of t1 and the quadrilateral vertex that is not in t1.


Constructor & Destructor Documentation

Arak::QueryPointIndex::RecolorQuadrilateralFunction::RecolorQuadrilateralFunction const Geometry::Triangle t1,
const Geometry::Triangle t2
[inline]
 

Constructor.

Parameters:
t1 the first triangle used to describe the quadrilateral; it must consist of any three vertices
t2 the second triangle used to describe the quadrilateral; it must consist of any two adjacent vertices in t1 and the remaining vertex of the quadrilateral

Definition at line 278 of file query_point.hpp.

References Arak::Geometry::Triangle.


Member Function Documentation

void Arak::QueryPointIndex::RecolorQuadrilateralFunction::operator() const QueryPoint q  )  [inline]
 

Recolors the supplied query point if it lies in the closure of the quadrilateral.

Parameters:
q the query point

Todo:
The technique used to recolor points does not work for points on the boundary of a quadrilateral that is not simple.

Definition at line 288 of file query_point.hpp.

References Arak::QueryPoint::recolor(), t1, and t2.


Member Data Documentation

const Geometry::Triangle* Arak::QueryPointIndex::RecolorQuadrilateralFunction::t1 [private]
 

A pointer to the first triangle used to represent the quadrilateral; it must consist of any three of the quadrilateral's vertices.

We use a pointer here so the default assignment operator works for objects of this type; this is required to use this functor in combination with the boost::function_output_iterator adaptor.

Definition at line 253 of file query_point.hpp.

Referenced by operator()().

const Geometry::Triangle* Arak::QueryPointIndex::RecolorQuadrilateralFunction::t2 [private]
 

A pointer to the second triangle used to represent the quadrilateral; it must have two adjacent vertices of t1 and the quadrilateral vertex that is not in t1.

We use a pointer here so the default assignment operator works for objects of this type; this is required to use this functor in combination with the boost::function_output_iterator adaptor.

Definition at line 263 of file query_point.hpp.

Referenced by operator()().


The documentation for this class was generated from the following file:
Generated on Wed May 25 14:41:29 2005 for Arak by doxygen 1.3.6