afl::Boundary_4 Class Reference

#include <boundary_4.h>

Inheritance diagram for afl::Boundary_4:

afl::SimpleBoundary_4 List of all members.

Public Member Functions

 Boundary_4 (const Point &from, const Point &to, bool colour)
 Boundary_4 (const Field *field, bool colour)
 Boundary_4 (const Boundary_4 &toCopy)
virtual ~Boundary_4 ()
virtual troolean locate (const Point &p) const
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
virtual Boundary_4clone ()
virtual Point findNearest (const Point &p) const
virtual Value getNormal (const Point &p) const
virtual Point getBoundingBoxMin () const
virtual Point getBoundingBoxMax () const

Protected Member Functions

 Boundary_4 ()
virtual int whereIs (const Point &p) const
virtual bool intersectSegment (const Point &from, const Point &to) const

Protected Attributes

bool _colour
std::list< Boundary_4_segments
Boundary_4_impl

Detailed Description

Class Boundary_4D A 4D boundary proxy. The real object is either a SimpleBoundary_4 (a rectangular area) or a FieldBoundary_4 (a 3D field of 4D vectors)


Constructor & Destructor Documentation

afl::Boundary_4::Boundary_4 const Point from,
const Point to,
bool  colour
 

constructs a proxy to a simple boundary

Parameters:
from one corner of the simple boundary
to the other corner of the simple boundary
colour red for island or black for hole

afl::Boundary_4::Boundary_4 const Field field,
bool  colour
 

constructs a proxy to a field boundary

Parameters:
field the field of the implementation
colour red for island or black for hole

afl::Boundary_4::Boundary_4 const Boundary_4 toCopy  ) 
 

copy constructor

Parameters:
toCopy the boundary_4 to copy

virtual afl::Boundary_4::~Boundary_4  )  [virtual]
 

desructor is virtual

afl::Boundary_4::Boundary_4  )  [protected]
 

empty constructor for children


Member Function Documentation

virtual void afl::Boundary_4::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.

Reimplemented in afl::SimpleBoundary_4.

virtual void afl::Boundary_4::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.

Reimplemented in afl::SimpleBoundary_4.

virtual Boundary_4* afl::Boundary_4::clone  )  [virtual]
 

Returns:
a newly created and exact copy of the object

Reimplemented in afl::SimpleBoundary_4.

virtual Point afl::Boundary_4::findNearest const Point p  )  const [virtual]
 

finds the nearest point on the boundary to a point.

Parameters:
p the point to find the nearest point of
Returns:
the nearest point to p that is on the boundary. If p is on the boundary, then p itself is returned.

Reimplemented in afl::SimpleBoundary_4.

virtual Point afl::Boundary_4::getBoundingBoxMax  )  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

Reimplemented in afl::SimpleBoundary_4.

virtual Point afl::Boundary_4::getBoundingBoxMin  )  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

Reimplemented in afl::SimpleBoundary_4.

virtual Value afl::Boundary_4::getNormal const Point p  )  const [virtual]
 

finds the vector normal to the boundary at a point p on the boundary

Parameters:
p the point on the boundary to find the normal to.
Returns:
a vector (i.e. 1 column value) that returns the normal to the boundary at p
Exceptions:
ddf::InvalidArgumentException if p is not on the boundary

Reimplemented in afl::SimpleBoundary_4.

virtual data_t afl::Boundary_4::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.

Reimplemented in afl::SimpleBoundary_4.

virtual bool afl::Boundary_4::intersectSegment const Point from,
const Point to
const [protected, virtual]
 

Parameters:
from one corner of a segment to intesect with this one
to the other corner of a segment to intersect with this one
Returns:
true if the segment defines with from and to overlap this segment but is not entirely contained in this segmetn. I.e. either the boudary is crossed or the segment contains this segment.

Reimplemented in afl::SimpleBoundary_4.

virtual troolean afl::Boundary_4::locate const Point p  )  const [virtual]
 

Parameters:
p The point to locate
Returns:
`outside' if the point is outside the domain, `boundary' if

Reimplemented in afl::SimpleBoundary_4.

virtual void afl::Boundary_4::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

Reimplemented in afl::SimpleBoundary_4.

virtual int afl::Boundary_4::whereIs const Point p  )  const [protected, virtual]
 

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

Reimplemented in afl::SimpleBoundary_4.


Member Data Documentation

bool afl::Boundary_4::_colour [protected]
 

red (island) or black (hole)

Boundary_4* afl::Boundary_4::_impl [protected]
 

the implementation of this proxy

std::list<Boundary_4> afl::Boundary_4::_segments [protected]
 

the sub segments within this segment


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