BPointGeo Class Reference

#include <BPointGeo.h>

Inheritance diagram for BPointGeo:

Inheritance graph
[legend]

List of all members.


Detailed Description

A geometry object that represents a single point.

Public Member Functions

 BPointGeo (const BPointGeo &pt)
 Copy constructor.
 BPointGeo (double x, double y, double z=0.0)
 Constructs a BPointGeo at the specified location.
 BPointGeo (BPoint pt)
 Constructs a BPointGeo at the location described in the specified BPoint.
 BPointGeo ()
 Default constructor.
virtual BGeometryClone (void) const
 Createa a deep-copy of this object.
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 BPointGeo to the specified BPoint.
virtual void DoResolveToPoint (const BPoint &refPt)
 Resolves this BGeometry based on the input BPoint.
virtual void FromByteArray (const BByteArray &bytes, size_t &startPos)
 Initializes an instance of this object from a BByteArray.
const BPointGetPoint (void) const
 Gets the location of this BPointGeo.
virtual const BPointsGetPoints (void) const
 Gets a collection of points that represents this BGeometry.
virtual BPointsGetPoints (void)
 Gets a collection of points that represents this BGeometry.
virtual const
BVectorizable
GetVectorizablePtr (void) const
 Returns an interface that can be used to convert this geometry to a simple geometry.
double GetX (void) const
 Gets the x-coordinate vof this BPointGeo.
double GetY (void) const
 Gets the y-coordinate vof this BPointGeo.
double GetZ (void) const
 Gets the z-coordinate vof this BPointGeo.
virtual bool Intersects (const BRect &rect) const
 Determines whether or not this BGeometry intersects the specified rectangle.
BPointGeooperator= (const BPointGeo &rhs)
 Assignment operator.
void SetPoint (const BPoint &pt)
 Sets the location of this BPointGeo.
void SetX (double x)
 Sets the x-coordinate of this BPointGeo.
void SetY (double y)
 Sets the y-coordinate of this BPointGeo.
void SetZ (double z)
 Sets the z-coordinate of this BPointGeo.
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.
virtual BGeometryVectorize (double factor=1.0) const
 Since BPointGeo is alread a simple geometry, this method does not change the BPointGeo at all.
virtual ~BPointGeo ()
 Destructor.

Protected Member Functions

virtual BRect ComputeMBR () const
 Computes the minimum bounding rectangle of this BPointGeo.

Protected Attributes

BPoint m_pt
 The location of this BPointGeo.

Constructor & Destructor Documentation

BPointGeo (  )  [inline]

Default constructor.

The resulting BPointGeo is located at the origin.

BPointGeo ( BPoint  pt  )  [inline]

Constructs a BPointGeo at the location described in the specified BPoint.

Parameters:
pt A BPoint that gives the location for this BPointGeo.

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

Constructs a BPointGeo at the specified location.

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

BPointGeo ( const BPointGeo pt  )  [inline]

Copy constructor.

Parameters:
pt The BPointGeo to copy.

virtual ~BPointGeo (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual BGeometry* Clone ( void   )  const [inline, virtual]

Createa 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 of this BPointGeo.

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

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

Calculates the distance from this BPointGeo to the specified BPoint.

Parameters:
point The BPoint 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 BPointGeo.

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.

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 of the 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.

const BPoint& GetPoint ( void   )  const [inline]

Gets the location of this BPointGeo.

Returns:
A BPoint that gives the location of this BPointGeo.

virtual const BPoints& GetPoints ( void   )  const [virtual]

Gets a collection of points that represents this BGeometry.

Returns:
The collection of points.

Reimplemented from BVectorizable.

virtual BPoints& GetPoints ( void   )  [virtual]

Gets a collection of points that represents this BGeometry.

Returns:
The collection of points.

virtual const BVectorizable* GetVectorizablePtr ( void   )  const [inline, virtual]

Returns an interface that can be used to convert this geometry to a simple geometry.

The caller should NOT delete the pointer returned by this method.

Note:
BPointGeo is a simple geometry.
Returns:
A BVectorizable interface for this object, or NULL if this geometry is already a simple geometry.

Reimplemented from BGeometry.

double GetX ( void   )  const [inline]

Gets the x-coordinate vof this BPointGeo.

Returns:
The x-coordinate.

double GetY ( void   )  const [inline]

Gets the y-coordinate vof this BPointGeo.

Returns:
The y-coordinate.

double GetZ ( void   )  const [inline]

Gets the z-coordinate vof this BPointGeo.

Returns:
The z-coordinate.

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

Determines whether or not this BGeometry intersects the specified rectangle.

Parameters:
rect The rectangle to test for intersection.
Returns:
True if this BGeometry intersects the rectangle and false otherwise.

Reimplemented from BGeometry.

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

Assignment operator.

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

void SetPoint ( const BPoint pt  ) 

Sets the location of this BPointGeo.

Parameters:
pt A BPoint that gives the new locaiton for this BPointGeo.

void SetX ( double  x  ) 

Sets the x-coordinate of this BPointGeo.

Parameters:
x The new x-coordinate.

void SetY ( double  y  ) 

Sets the y-coordinate of this BPointGeo.

Parameters:
y The new y-coordinate.

void SetZ ( double  z  ) 

Sets the z-coordinate of this BPointGeo.

Parameters:
z The new z-coordinate.

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.

virtual BGeometry* Vectorize ( double  factor = 1.0  )  const [inline, virtual]

Since BPointGeo is alread a simple geometry, this method does not change the BPointGeo at all.

Parameters:
factor The value used to adjust the number of points in the resulting BPolyline. This parameter is ignored for BPointGeo objects.
Returns:
A new BPointGeo that is a copy of this BPointGeo.

Implements BVectorizable.


Member Data Documentation

BPoint m_pt [protected]

The location of this BPointGeo.


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

GeoTranslate 5.0 From Blue Marble Geographics