afl::Boundary_1 Class Reference

#include <boundary_1.h>

List of all members.

Public Member Functions

 Boundary_1 ()
 Boundary_1 (const Point &from, const Point &to, bool colour=black)
 Boundary_1 (const Boundary_1 &toCopy)
virtual ~Boundary_1 ()
virtual data_t intersect (const Point &p, const Point &v) const
virtual void addSegment (const Point &from, const Point &to)
virtual void addSegment (const Field *field)
virtual void toXML (std::ostream &doc, const std::string &componentsDir, const std::string &baseURI) const
data_t getFrom () const
void setFrom (data_t value)
data_t getTo () const
void setTo (data_t value)
bool getColour () const
void setColour (bool value)
virtual Point getStart () const
virtual Point getEnd () const
int whereIs (const Point &p) const
Point findNearest (const Point &p) const


Detailed Description

Class Boundary_1 A segment in a 1D field. The segment could either be solid (aka positive, red) or a hold (aka negative, black)


Constructor & Destructor Documentation

afl::Boundary_1::Boundary_1  ) 
 

empty constructor creates the root boundary

afl::Boundary_1::Boundary_1 const Point from,
const Point to,
bool  colour = black
 

Constructor

Parameters:
from the start of the segment
to the end of the segment
colour the colour of the segment (red or black)

afl::Boundary_1::Boundary_1 const Boundary_1 toCopy  ) 
 

copy constructor

Parameters:
toCopy the segmet to copy

virtual afl::Boundary_1::~Boundary_1  )  [inline, virtual]
 

Destructor


Member Function Documentation

virtual void afl::Boundary_1::addSegment const Field field  )  [virtual]
 

adds a segment of the opposite colour.

Parameters:
field a field of the appropriate dimensions to define the new boundary section
Exceptions:
ddf::GeometryException is thrown if the new segment has no hyper-volume
ddf::InvalidArgumentException is thrown if the new segment overlaps an existing segment or if the new segment is not of the right dimension/value.

virtual void afl::Boundary_1::addSegment const Point from,
const Point to
[virtual]
 

adds a segment of the opposite colour.

Parameters:
from one hyper corner of the new rectangular segment
to the opposite hyper-corner of the new rectangular segment
Exceptions:
ddf::GeometryException is thrown if the new segment has no hyper-volume
ddf::InvalidArgumentException is thrown if the new segment overlaps an existing segment or if the new segment is not of the right dimension.

Point afl::Boundary_1::findNearest const Point p  )  const
 

finds the nearest point to and of the boundary points of this segment and its children

Parameters:
p the point to find the closest boundary point to
Returns:
the closest boundary point to p

bool afl::Boundary_1::getColour  )  const
 

Get the value of _colour represents whether this boundary segment is a negative segment ("hole") or a positive segment. Negative segments are black, positive segments are red.

Returns:
the value of _colour

virtual Point afl::Boundary_1::getEnd  )  const [virtual]
 

Returns:
the largest point in the boundary. In a simple boundary, this is a point with the largest value of X, Y, Z and T. In a field boundary this is the point that corresponds to field's boundary's largest point

data_t afl::Boundary_1::getFrom  )  const
 

Get the value of _from the start of this boundary segment

Returns:
the value of _from

virtual Point afl::Boundary_1::getStart  )  const [virtual]
 

Returns:
the smallest point in the boundary. In a simple boundary, this is a point with the smallest value of X, Y, Z and T. In a field boundary this is the point that corresponds to field's boundary's smallest point

data_t afl::Boundary_1::getTo  )  const
 

Get the value of _to the end of this boundary segment

Returns:
the value of _to

virtual data_t afl::Boundary_1::intersect const Point p,
const Point v
const [virtual]
 

Finds the distance from a point to the boundary in the direction of a vector.

Parameters:
p The point that is being queried.
v the vector to find an intersection in the direction of
Returns:
the distance from the point along the vector that the boundary intersects (or the shortest distance if there are multiple intersections) of the length of the vector if there is no intersection. If p is on the boundary then the return value is 0. if p is outside the domain the distance is still positive.

void afl::Boundary_1::setColour bool  value  ) 
 

Set the value of _colour represents whether this boundary segment is a negative segment ("hole") or a positive segment. Negative segments are black, positive segments are red.

void afl::Boundary_1::setFrom data_t  value  ) 
 

Set the value of _from the start of this boundary segment

void afl::Boundary_1::setTo data_t  value  ) 
 

Set the value of _to the end of this boundary segment

virtual void afl::Boundary_1::toXML std::ostream &  doc,
const std::string &  componentsDir,
const std::string &  baseURI
const [virtual]
 

represents the segment as an XML string that will be put onto doc

Parameters:
doc the stream to put the XML string on
componentsDir the path of a directory to store component files in
baseURI a URI that refers to the directory in componentsDir

int afl::Boundary_1::whereIs const Point p  )  const
 

Returns:
-1 if the point is outside the domain, -2 if the point is inside a hole -3 if the point is before the segment, 0 if the point is on the boundary, or 1 if the point is inside the domain.
Parameters:
p The point to query


The documentation for this class was generated from the following file:
Generated on Fri Dec 22 07:17:51 2006 for afl by  doxygen 1.4.6