#include <BPath.h>

Public Member Functions | |
| virtual void | AddPoint (const BPoint &pt) |
| Add a BPoint to this BPath. | |
| virtual void | AddPoints (const BPoints &pts) |
| Adds a collection of BPoints to this BPath. | |
| virtual void | AddSegment (const BSegmentPtr &pSeg, bool addConnectingLine=false, double tolerance=1e-14) |
| Add a BSegment to this BPath. | |
| BPath (const BPath &path) | |
| Copy constructor. | |
| BPath (EGeometryType type) | |
| Constructs a BPath with the specified geometry type. | |
| BPath () | |
| Default constructor. | |
| void | Clear (void) |
| Removes all segments from this BPath. | |
| virtual BGeometry * | Clone (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 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. | |
| virtual BGeometry * | Downsample (UInt32 maxPoints) const |
| Changes the geometry to contain, at most, the specified number of points. | |
| virtual void | FromByteArray (const BByteArray &bytes, size_t &startPos) |
| Initializes an instance of this object from a BByteArray. | |
| virtual size_t | GetCount (void) const |
| Gets the number of segments in this BPath. | |
| virtual const BPoints & | GetPoints (void) const |
| Gets a collection of points that represents this BGeometry. | |
| virtual BSegmentPtr | GetSegmentAt (size_t index) const |
| Gets the segment at the specified index in this BPath. | |
| virtual const BVectorizable * | GetVectorizablePtr (void) const |
| Returns an interface that can be used to convert this geometry to a simple geometry. | |
| virtual bool | Intersects (const BRect &rect) const |
| Determines whether or not this BGeometry intersects the specified rectangle. | |
| virtual void | Reserve (size_t numSegs) |
| Reserves space for the requested number of elements in this collection. | |
| 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 BGeometry * | Vectorize (double factor=1.0) const |
| Converts this BLine to a BPolyline that matches this BLine. | |
| virtual | ~BPath () |
| Destructor. | |
Protected Member Functions | |
| virtual BRect | ComputeMBR () const |
| Computes the minimum bounding rectangle for this BGeometry. | |
| virtual void | ComputeStats (void) const |
| Calculates the length and MBR of this BGeometry. | |
Protected Attributes | |
| BPoints | m_points |
| The collection of BPoint objects that make up this BSegment. | |
| BSegLinkVector | m_segments |
| The associated BSegLink collection. | |
| BPath | ( | ) | [inline] |
Default constructor.
| BPath | ( | EGeometryType | type | ) | [inline] |
| virtual ~BPath | ( | ) | [inline, virtual] |
Destructor.
| virtual void AddPoint | ( | const BPoint & | pt | ) | [virtual] |
| virtual void AddPoints | ( | const BPoints & | pts | ) | [virtual] |
| virtual void AddSegment | ( | const BSegmentPtr & | pSeg, | |
| bool | addConnectingLine = false, |
|||
| double | tolerance = 1e-14 | |||
| ) | [virtual] |
If the start point for the new segment does not match the end point of the previous segment, then an additional line segment can optionally be added to connect the end of the previous segment and the start of the segment being added.
| pSeg | The BSegment to be added. | |
| addConnectingLine | True indicates that we should add a connecting line segment between the end of the previous segment and the start of the new one if the distance between them exceeds the specified tolerance. | |
| tolerance | As long as the distance between the end of the previous segment and the start of the new one is below this value, the points are considered to be the same point. |
| void Clear | ( | void | ) |
Removes all segments from this BPath.
| virtual BGeometry* Clone | ( | void | ) | const [inline, virtual] |
| virtual BRect ComputeMBR | ( | ) | const [protected, virtual] |
| virtual size_t ComputeSize | ( | void | ) | const [virtual] |
Computes the size of the BByteArray required to store this object.
Reimplemented from BLinearGeo.
| virtual void ComputeStats | ( | void | ) | const [protected, virtual] |
| virtual double DistanceTo | ( | const BPoint & | point | ) | const [virtual] |
| virtual void DoResolveToPoint | ( | const BPoint & | refPt | ) | [virtual] |
Changes the geometry to contain, at most, the specified number of points.
| maxPoints | The maximum number of points in the new geometry. |
Implements BResamplable.
| virtual void FromByteArray | ( | const BByteArray & | bytes, | |
| size_t & | startPos | |||
| ) | [virtual] |
Initializes an instance of this object from a BByteArray.
| 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 BLinearGeo.
| virtual size_t GetCount | ( | void | ) | const [inline, virtual] |
| virtual const BPoints& GetPoints | ( | void | ) | const [virtual] |
Gets a collection of points that represents this BGeometry.
Reimplemented from BVectorizable.
| virtual BSegmentPtr GetSegmentAt | ( | size_t | index | ) | const [virtual] |
| 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.
Reimplemented from BGeometry.
| virtual bool Intersects | ( | const BRect & | rect | ) | const [virtual] |
| virtual void Reserve | ( | size_t | numSegs | ) | [virtual] |
Reserves space for the requested number of elements in this collection.
| numSegs | The number of elements for which space shall be reserved. |
| virtual BByteArray ToByteArray | ( | void | ) | const [virtual] |
Stores this object in a BByteArray.
Reimplemented from BLinearGeo.
| virtual void Transform | ( | const BTransform & | cst | ) | [virtual] |
Transforms the coordinates in this BGeometry to a different coordinate system.
| 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.
| cst | The BTransform that describes the transformation. |
Reimplemented from BGeometry.
| virtual BGeometry* Vectorize | ( | double | factor = 1.0 |
) | const [virtual] |
Converts this BLine to a BPolyline that matches this BLine.
| factor | The value used to adjust the number of points in the resulting BPolyline. This parameter is ignored for BLine objects. |
Implements BVectorizable.
BSegLinkVector m_segments [protected] |
The associated BSegLink collection.