BPoint Class Reference

#include <BPoint.h>

Inheritance diagram for BPoint:

Inheritance graph
[legend]

List of all members.


Detailed Description

A three-dimensional coordinate point that implements the BByteStreamable interface.

The meaning of the BPoint's x, y, and z fields is dependent upon the type of coordinate system in which the point exists. In a Cartesian coordinate system, the x, y, and z fields correspond the the x, y, and z coordinates, respectively. In a projected coordinate system, such as a UTM zone, The x field gives the east (or easting) coordinate, the y field gives the north (or northing) coordinate, and the z field gives the height coordinate. In a geodetic (or lat/lon) coordinate system, the x field gives the longitude coordinate, the y field gives the latitude coordinate, and the z field gives the height coordinate.

Public Member Functions

 BPoint (const BPoint &pt)
 Copy constructor.
 BPoint (double x, double y, double z=0.0)
 Constructs a BPoint with the specified coordinates.
 BPoint (BPoint3d pt)
 Constructs a BPoint that expresses the same location as the specified BPoint3d.
 BPoint ()
 Default constructor.
virtual size_t ComputeSize (void) const
 Computes the size of the BByteArray required to store this object.
virtual double DistanceTo (const BPoint &point) const
 Calculates the distance from this BPoint to the specified BPoint.
virtual void FromByteArray (const BByteArray &bytes, size_t &startPos)
 Initializes an instance of this object from a BByteArray.
BPoint MidPoint (const BPoint &point) const
 Calculates the midpoint between this BPoint and the specified BPoint.
bool operator!= (const BPoint &rhs) const
 Inquality operator.
BPointoperator= (const BPoint &rhs)
 Assignment operator.
bool operator== (const BPoint &rhs) const
 Equality operator.
virtual BByteArray ToByteArray (void) const
 Stores this object in a BByteArray.
void Transform (const BTransform &cst)
 Transforms this BPoint to a different coordinate system.
void TransformReverse (const BTransform &cst)
 Transforms this BPoint to a different coordinate system using the "reverse" of the BTransform.
virtual ~BPoint ()
 Destructor.

Static Public Member Functions

static size_t SizeOf (void)
 Indicates the size of a BPoint in bytes.


Constructor & Destructor Documentation

BPoint (  )  [inline]

Default constructor.

BPoint ( BPoint3d  pt  )  [inline]

Constructs a BPoint that expresses the same location as the specified BPoint3d.

Parameters:
pt The BPoint3d from which the location will be copied

BPoint ( double  x,
double  y,
double  z = 0.0 
) [inline]

Constructs a BPoint with the specified coordinates.

Parameters:
x The x-coordinate.
y The y-coordinate.
z The z-coordinate (optional).

BPoint ( const BPoint pt  )  [inline]

Copy constructor.

Parameters:
pt The BPoint to copy.

virtual ~BPoint (  )  [inline, virtual]

Destructor.


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.

Implements BByteStreamable.

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

Calculates the distance from this BPoint to the specified BPoint.

Parameters:
point The BPoint used to calculate distance.
Returns:
The distance between the two BPoints. The units used to express the distance are the same units used to express the location of the BPoint.

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.

Implements BByteStreamable.

BPoint MidPoint ( const BPoint point  )  const [inline]

Calculates the midpoint between this BPoint and the specified BPoint.

Parameters:
point The other point to use for the midpoint calculation.
Returns:
The midpoint between this point and the input point

bool operator!= ( const BPoint rhs  )  const [inline]

Inquality operator.

Parameters:
rhs The BPoint to compare to this one.
Returns:
True if the specified BPoint does not have the same value as this one and false otherwise.

BPoint& operator= ( const BPoint rhs  )  [inline]

Assignment operator.

Parameters:
rhs The BPoint whose value will be copied into this one.
Returns:
A reference to this BPoint.

bool operator== ( const BPoint rhs  )  const [inline]

Equality operator.

Parameters:
rhs The BPoint to compare to this one.
Returns:
True if the specified BPoint has the same value as this one and false otherwise.

static size_t SizeOf ( void   )  [inline, static]

Indicates the size of a BPoint in bytes.

Returns:
The size of a BPoint in bytes.

virtual BByteArray ToByteArray ( void   )  const [virtual]

Stores this object in a BByteArray.

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

Implements BByteStreamable.

void Transform ( const BTransform cst  ) 

Transforms this BPoint to a different coordinate system.

Parameters:
cst The BTransform that describes the transformation.

void TransformReverse ( const BTransform cst  ) 

Transforms this BPoint to a different coordinate system using the "reverse" of the BTransform.

Parameters:
cst The BTransform that describes the transformation.


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

GeoTranslate 5.0 From Blue Marble Geographics