BAggregateGeo Class Reference

#include <BAggregateGeo.h>

Inheritance diagram for BAggregateGeo:

Inheritance graph
[legend]

List of all members.


Detailed Description

An aggregate geometry that can contain any type of BGeometry object.

Public Member Functions

void Add (const BAggregateGeo &aggy)
 Adds a collection of BGeometry objects to this BAggregateGeo.
void Add (const BGeometryPtr &pGeo)
 Adds a BGeometry to this BAggregateGeo.
virtual void AddGeometry (const BGeometryPtr &pGeo)
 Adds a BGeometry to this BAggregateGeo.
 BAggregateGeo (const BAggregateGeo &aggy)
 Copy constructor.
 BAggregateGeo ()
 Default constructor, which constructs an empty collection of BGeometry objects.
virtual BGeometryClone (void) const
 Creates a deep-copy of this object.
virtual size_t ComputeSize (void) const
 Compute the size of the BByteArray required to store this object.
virtual bool Contains3dGeometry () const
 Indicates whether or not the collection contains three dimensional BGeometry objects.
virtual double DistanceTo (const BPoint &point) const
 Calculates the minimum distance from this BGeometry to the specified BPoint.
virtual void DoResolveToPoint (const BPoint &refPt)
 Resolves this BGeometry based on the input BPoint.
BAggregateGeoPtr Flatten (void) const
 Flattens the BAggregateGeo.
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 BGeometry from this BAggregateGeo.
virtual size_t GetGeometryCount (void) const
 Gets the number of BGeometry objects in this BAggregateGeo.
virtual bool Intersects (const BRect &rect) const
 Determines whether or not this BGeometry intersects the specified BRect.
virtual bool IsAggregate (void) const
 Determines whether or not this BGeometry is an aggregate geometry.
void Remove (const BGeometryPtr &pGeo)
 Removes a BGeometry from this BAggregateGeo.
virtual BByteArray ToByteArray (void) const
 Stores this object in a BByteArray.
virtual void Transform (const BTransform &cst)
 Transforms the coordinates in this BGeometry to a different coordinate system.
virtual void TransformReverse (const BTransform &cst)
 Transforms the coordinates in this BGeometry to a different coordinate system using the "reverse" of the BTransform.
 ~BAggregateGeo ()
 Destructor.

Protected Member Functions

virtual BRect ComputeMBR () const
 Computes the minimum bounding rectangle for this BAggregateGeo.

Constructor & Destructor Documentation

BAggregateGeo (  )  [inline]

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

BAggregateGeo ( const BAggregateGeo aggy  ) 

Copy constructor.

Parameters:
aggy The BAggregateGeo to copy.

~BAggregateGeo (  )  [inline]

Destructor.


Member Function Documentation

void Add ( const BAggregateGeo aggy  ) 

Adds a collection of BGeometry objects to this BAggregateGeo.

Parameters:
aggy The collection of BGeometry objects.

void Add ( const BGeometryPtr pGeo  ) 

Adds a BGeometry to this BAggregateGeo.

Parameters:
pGeo The BGeometry to add to this BAggregateGeo

virtual void AddGeometry ( const BGeometryPtr pGeo  )  [virtual]

Adds a BGeometry to this BAggregateGeo.

Parameters:
pGeo The BGeometry to be added.

Implements BGeometryCollection.

virtual BGeometry* Clone ( void   )  const [virtual]

Creates a deep-copy of this object.

Returns:
A deep-copy of this object.

Implements BGeometry.

virtual BRect ComputeMBR (  )  const [protected, virtual]

Computes the minimum bounding rectangle for this BAggregateGeo.

Returns:
The minimum bounding rectangle.

Implements BGeometry.

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

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

Returns:
The size of the BByteArray.

Reimplemented from BGeometry.

virtual bool Contains3dGeometry (  )  const [virtual]

Indicates whether or not the collection contains three dimensional BGeometry objects.

Returns:
True if this BAggregateGeo contains a three dimensional BGeometry and false otherwise.

Implements BGeometryCollection.

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

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

Parameters:
point The point used to calculate 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 this BGeometry based on the input BPoint.

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

Parameters:
refPt The insertion point.

Implements BGeometry.

BAggregateGeoPtr Flatten ( void   )  const

Flattens the BAggregateGeo.

Returns a BAggregateGeo that contains only primitive (non-aggregate) BGeometry objects. Any aggregates in the collection will be flattened, and their BGeometry objects added to this collection.

Returns:
A BAggregateGeo containing only primitive BGeometry objects.

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 BGeometry.

virtual BGeometryPtr GetGeometryAt ( size_t  index  )  const [virtual]

Gets a BGeometry from this BAggregateGeo.

Parameters:
index The index of the desired BGeometry.
Returns:
The BGeometry at the specified index.

Implements BGeometryCollection.

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

Gets the number of BGeometry objects in this BAggregateGeo.

Returns:
The number of BGeometry objects in this BAggregateGeo.

Implements BGeometryCollection.

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

Determines whether or not this BGeometry intersects the specified BRect.

Parameters:
rect The BRect to test for intersection.
Returns:
True if the geometry 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 object is a BAggregateGeo, this method will always return true.

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

Reimplemented from BGeometry.

void Remove ( const BGeometryPtr pGeo  ) 

Removes a BGeometry from this BAggregateGeo.

Parameters:
pGeo The BGeometry to remove from this BAggregateGeo.

virtual BByteArray ToByteArray ( void   )  const [virtual]

Stores this object in a BByteArray.

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

Reimplemented from BGeometry.

virtual void Transform ( const BTransform cst  )  [virtual]

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

Parameters:
cst The BTransform that describes the transformation.

Reimplemented from BGeometry.

virtual void TransformReverse ( const BTransform cst  )  [virtual]

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

Parameters:
cst The BTransform that describes the transformation.

Reimplemented from BGeometry.


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

GeoTranslate 5.0 From Blue Marble Geographics