BAreaGeo Class Reference

#include <BAreaGeo.h>

Inheritance diagram for BAreaGeo:

Inheritance graph
[legend]

List of all members.


Detailed Description

Abstract base class for area-type geometries, such as BPolygon, BEllipse, etc.

Public Member Functions

virtual size_t ComputeSize (void) const
 Computes the size of the BByteArray required to store this object.
virtual bool Contains (const BPoint &point) const =0
 Determines whether or not the specified BPoint is contained within this BAreaGeo.
virtual void FromByteArray (const BByteArray &bytes, size_t &startPos)
 Initializes an instance of this object from a BByteArray.
virtual double GetArea (void) const
 Calculates the area of this BAreaGeo.
virtual BPoint GetCentroid () const
 Gets the centroid of this BAreaGeo.
virtual EOrientation GetOrientation (void) const
 Gets the orientation for this BAreaGeo.
virtual double GetPerimeter (void) const
 Calculate the perimeter of this BAreaGeo.
virtual BByteArray ToByteArray (void) const
 Stores this object in a BByteArray.
virtual ~BAreaGeo ()
 Destructor.

Protected Member Functions

 BAreaGeo (const BAreaGeo &ageo)
 Copy constructor.
 BAreaGeo (EGeometryType type, EOrientation orientation=eOrientationNone)
 Constructs a BAreaGeo of the specified geometry type.
 BAreaGeo ()
 Default constructor.
virtual void ComputeStats () const =0
 Computes the MBR, centroid, area, perimeter, and orientation.

Protected Attributes

double m_area
 The area of this BAreaGeo.
BPoint m_centroid
 The center point of this BAreaGeo.
EOrientation m_orientation
 The orientation of this BAreaGeo.
double m_perimeter
 The perimeter of this BAreaGeo.

Constructor & Destructor Documentation

virtual ~BAreaGeo (  )  [inline, virtual]

Destructor.

BAreaGeo (  )  [inline, protected]

Default constructor.

BAreaGeo ( EGeometryType  type,
EOrientation  orientation = eOrientationNone 
) [inline, protected]

Constructs a BAreaGeo of the specified geometry type.

Parameters:
type The geometry type.
orientation The orientation for the new geometry.

BAreaGeo ( const BAreaGeo ageo  )  [inline, protected]

Copy constructor.

Parameters:
ageo The BAreaGeo to copy.


Member Function Documentation

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

Reimplemented in BAggregateArea, BDonut, BEllipse, BPolygon, and BRoundRectangle.

virtual void ComputeStats (  )  const [protected, pure virtual]

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

Implemented in BAggregateArea, BDonut, BEllipse, and BPolygon.

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

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

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

Implemented in BAggregateArea, BDonut, BEllipse, BPolygon, and BRectangle.

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.

Reimplemented in BAggregateArea, BDonut, BEllipse, BPolygon, and BRoundRectangle.

virtual double GetArea ( void   )  const [virtual]

Calculates the area of this BAreaGeo.

Returns:
The area of this BAreaGeo.

virtual BPoint GetCentroid (  )  const [virtual]

Gets the centroid of this BAreaGeo.

Returns:
The centroid of this BAreaGeo.

Reimplemented in BEllipse.

virtual EOrientation GetOrientation ( void   )  const [virtual]

Gets the orientation for this BAreaGeo.

Returns:
The orientation of this BAreaGeo.

virtual double GetPerimeter ( void   )  const [virtual]

Calculate the perimeter of this BAreaGeo.

Returns:
The length of the perimeter of this BAreaGeo.

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.

Reimplemented in BAggregateArea, BDonut, BEllipse, BPolygon, and BRoundRectangle.


Member Data Documentation

double m_area [mutable, protected]

The area of this BAreaGeo.

BPoint m_centroid [mutable, protected]

The center point of this BAreaGeo.

EOrientation m_orientation [mutable, protected]

The orientation of this BAreaGeo.

double m_perimeter [mutable, protected]

The perimeter of this BAreaGeo.


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

GeoTranslate 5.0 From Blue Marble Geographics