BAggregateArea Class Reference

#include <BAggregateArea.h>

Inheritance diagram for BAggregateArea:

Inheritance graph
[legend]

List of all members.


Detailed Description

An aggregate geometry that can contain only BAreaGeo geometries.

Public Member Functions

void Add (const BAggregateArea &aggy)
 Adds a collection of BAreaGeo objects to this collection.
void Add (const BAreaGeoPtr &pGeo)
 Adds a BAreaGeo to this collection.
virtual void AddGeometry (const BGeometryPtr &pGeo)
 Adds a BGeometry to the collection.
 BAggregateArea (const BAggregateArea &aggy)
 Copy constructor.
 BAggregateArea ()
 Default constructor, which constructs an empty collection of BAreaGeo objects.
virtual BGeometryClone (void) const
 Creates a deep-copy of this object.
virtual size_t ComputeSize (void) const
 Computes the size of the BByteArray required to store this object.
virtual bool Contains (const BPoint &point) const
 Determines whether or not the specified BPoint is contained within this BAggregateArea.
virtual bool Contains3dGeometry () const
 Indicates whether or not this BAggregateArea contains 3D geometries.
virtual double DistanceTo (const BPoint &point) const
 Calculates the minimum distance from this BAggregateArea to the specified BPoint.
virtual void DoResolveToPoint (const BPoint &refPt)
 Resolves the BAggregateArea based on the input point.
BAggregateAreaPtr Flatten (void) const
 Flattens the collection.
virtual void FromByteArray (const BByteArray &bytes, size_t &startPos)
 Initializes an instance of this object from a BByteArray.
virtual BGeometryPtr GetGeometryAt (size_t index) const
 Gets a BAreaGeo from the collection.
virtual size_t GetGeometryCount (void) const
 Gets the number of BAreaGeo objects in this BAggregateArea.
virtual size_t GetPointCount (void) const
 Get the total number of points in this BAggregateArea.
virtual bool Intersects (const BRect &rect) const
 Determines whether or not the BAggregateArea intersects the specified BRect.
virtual bool IsAggregate (void) const
 Determines whether or not this BGeometry is an aggregate geometry.
virtual bool IsClosed (void) const
 Indicates whether or not this is a "closed" geometry, such as a BPolygon or a BEllipse.
void Remove (const BAreaGeoPtr &pGeo)
 Removes a BAreaGeo from this collection.
virtual BByteArray ToByteArray (void) const
 Stores this object in a BByteArray.
virtual void Transform (const BTransform &cst)
 Transforms the coordinates in this BAggregateArea to a different coordinate system.
virtual void TransformReverse (const BTransform &cst)
 Transforms the coordinates in this BAggregateArea to a different coordinate system using the "reverse" of the BTransform.
virtual ~BAggregateArea ()
 Destructor.

Protected Member Functions

virtual BRect ComputeMBR () const
 Computes the minimum bounding rectangle for this BAggregateArea.
virtual void ComputeStats () const
 Computes the MBR, centroid, area, perimeter, and orientation.

Constructor & Destructor Documentation

BAggregateArea (  )  [inline]

Default constructor, which constructs an empty collection of BAreaGeo objects.

BAggregateArea ( const BAggregateArea aggy  ) 

Copy constructor.

Parameters:
aggy The BAggregateArea to copy.

virtual ~BAggregateArea (  )  [inline, virtual]

Destructor.


Member Function Documentation

void Add ( const BAggregateArea aggy  ) 

Adds a collection of BAreaGeo objects to this collection.

Parameters:
aggy The collection of BAreaGeo objects.

void Add ( const BAreaGeoPtr pGeo  ) 

Adds a BAreaGeo to this collection.

Parameters:
pGeo The BAreaGeo to add to this collection.

virtual void AddGeometry ( const BGeometryPtr pGeo  )  [virtual]

Adds a BGeometry to the collection.

The BGeometry object must be of the eClassArea geometry class.

Parameters:
pGeo The BGeometry to be added.

Implements BGeometryCollection.

virtual BGeometry* Clone ( void   )  const [virtual]

Creates a deep-copy of this object.

Returns:
A copy of this object.

Implements BGeometry.

virtual BRect ComputeMBR (  )  const [protected, virtual]

Computes the minimum bounding rectangle for this BAggregateArea.

Returns:
The minimum bounding rectangle.

Implements BGeometry.

virtual size_t ComputeSize ( void   )  const [inline, virtual]

Computes the size of the BByteArray required to store this object.

Returns:
The size of the BByteArray.

Reimplemented from BAreaGeo.

virtual void ComputeStats (  )  const [protected, virtual]

Computes the MBR, centroid, area, perimeter, and orientation.

Implements BAreaGeo.

virtual bool Contains ( const BPoint point  )  const [virtual]

Determines whether or not the specified BPoint is contained within this BAggregateArea.

Parameters:
point The BPoint to test for containment.
Returns:
True if the point is contained within this BAggregateArea and false otherwise.

Implements BAreaGeo.

virtual bool Contains3dGeometry (  )  const [virtual]

Indicates whether or not this BAggregateArea contains 3D geometries.

Returns:
True if this collection contains 3D geometry and false otherwise.

Implements BGeometryCollection.

virtual double DistanceTo ( const BPoint point  )  const [virtual]

Calculates the minimum distance from this BAggregateArea to the specified BPoint.

Parameters:
point The BPoint used to calculate the distance.
Returns:
The distance. The units used to express this distance are the same as the units used to express the location of this BGeometry.

Reimplemented from BGeometry.

virtual void DoResolveToPoint ( const BPoint refPt  )  [virtual]

Resolves the BAggregateArea based on the input point.

This should only be called on geometry objects that are part of a block definition and contain coordinates that represent offsets from a point rather then an absolute location.

Parameters:
refPt The insertion point.

Implements BGeometry.

BAggregateAreaPtr Flatten ( void   )  const

Flattens the collection.

Returns a BAggregateArea that contains only primitive geometries. Any aggregates (e.g. BAggregateArea or BDonut) will be flattened, and their geometries added to this collection.

Returns:
The BAggregateArea containing primitive geometries.

virtual void FromByteArray ( const BByteArray bytes,
size_t &  startPos 
) [virtual]

Initializes an instance of this object from a BByteArray.

Parameters:
bytes The BByteArray containing the byte representation for this object.
startPos The position in the BByteArray where the byte representation begins. This value will be updated to point to the byte past the end of this object in the byte array.

Reimplemented from BAreaGeo.

virtual BGeometryPtr GetGeometryAt ( size_t  index  )  const [virtual]

Gets a BAreaGeo from the collection.

Parameters:
index The index of the desired BAreaGeo.
Returns:
The BAreaGeo object at the specified index.

Implements BGeometryCollection.

virtual size_t GetGeometryCount ( void   )  const [inline, virtual]

Gets the number of BAreaGeo objects in this BAggregateArea.

Returns:
The number of BAreaGeo objects in the collection.

Implements BGeometryCollection.

virtual size_t GetPointCount ( void   )  const [virtual]

Get the total number of points in this BAggregateArea.

Returns:
The number of points.

virtual bool Intersects ( const BRect rect  )  const [virtual]

Determines whether or not the BAggregateArea intersects the specified BRect.

Parameters:
rect The BRect to test for intersection.
Returns:
True if the BAggregateArea intersects the BRect and false otherwise.

Reimplemented from BGeometry.

virtual bool IsAggregate ( void   )  const [inline, virtual]

Determines whether or not this BGeometry is an aggregate geometry.

Since this is a BAggregateArea object, this method will always return true.

Returns:
True if the geometry is an aggregate (a collection of BGeometry objects) and false otherwise.

Reimplemented from BGeometry.

virtual bool IsClosed ( void   )  const [inline, virtual]

Indicates whether or not this is a "closed" geometry, such as a BPolygon or a BEllipse.

Returns:
True if the geometry is closed and false otherwise.

Reimplemented from BGeometry.

void Remove ( const BAreaGeoPtr pGeo  ) 

Removes a BAreaGeo from this collection.

Parameters:
pGeo The BAreaGeo to remove from this collection.

virtual BByteArray ToByteArray ( void   )  const [virtual]

Stores this object in a BByteArray.

Returns:
A BByteArray that stores the contents of this object.

Reimplemented from BAreaGeo.

virtual void Transform ( const BTransform cst  )  [virtual]

Transforms the coordinates in this BAggregateArea to a different coordinate system.

Parameters:
cst The coordinate transform definition.

Reimplemented from BGeometry.

virtual void TransformReverse ( const BTransform cst  )  [virtual]

Transforms the coordinates in this BAggregateArea to a different coordinate system using the "reverse" of the BTransform.

Parameters:
cst The coordinate transform definition.

Reimplemented from BGeometry.


The documentation for this class was generated from the following file:

GeoTranslate 5.0 From Blue Marble Geographics