#include <BPolygon.h>

Public Member Functions | |
| void | AddPoint (const BPoint &pt) |
| Adds a new vertex to this BPolygon. | |
| void | AddPoints (const BPoints &pts) |
| Adds a collection of new vertices to this BPolygon. | |
| BPolygon (const BPolygon &p) | |
| Copy constructor. | |
| BPolygon (const BAreaGeoPtr &pGeo) | |
| Constructs a BPolygon that approximates the specified BAreaGeo. | |
| BPolygon (EGeometryType type) | |
| Constructor. | |
| BPolygon (size_t num) | |
| Constructs a new BPolygon and reserves space for the specified number of points. | |
| BPolygon () | |
| Default constructor. | |
| virtual BGeometry * | Clone (void) const |
| Create a deep-copy of this object. | |
| virtual size_t | ComputeSize (void) const |
| Computes the size of the BByteArray required to store this object. | |
| virtual bool | Contains (const BPoints &points) const |
| Determines whether or not the all of the specified BPoints are contained within this BAreaGeo. | |
| virtual bool | Contains (const BPoint &point) const |
| Determines whether or not the specified BPoint is contained within this BAreaGeo. | |
| 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 vertices in this BPolygon. | |
| virtual const BPoint & | GetPointAt (size_t index) const |
| Gets the BPoint representing the specified vertex. | |
| 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 BPoint &pt1, const BPoint &pt2) const |
| Determines whether or not this BGeometry intersects the line defined by the specified points. | |
| virtual bool | Intersects (const BRect &rect) const |
| Determines whether or not this BGeometry intersects the specified rectangle. | |
| virtual bool | IsClosed (void) const |
| Indicates whether or not this is a "closed" geometry. | |
| BPolygon & | operator= (const BPolygon &rhs) |
| Assignment operator. | |
| void | SetPoints (const BPoints &points) |
| Set the BPoints collection that defines the vertices of this BPolygon. | |
| 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 |
| Since a BPolygon is a simple geometry, this method will return a copy of this BPolygon. | |
| virtual | ~BPolygon () |
| Destructor. | |
Protected Member Functions | |
| virtual BRect | ComputeMBR () const |
| Computes the minimum bounding rectangle for this BGeometry. | |
| virtual void | ComputeStats () const |
| Computes the MBR, centroid, area, perimeter, and orientation. | |
| BPolygon | ( | ) | [inline] |
Default constructor.
| BPolygon | ( | size_t | num | ) | [inline] |
Constructs a new BPolygon and reserves space for the specified number of points.
| num | The number of points for which space will be reserved. |
| BPolygon | ( | EGeometryType | type | ) | [inline] |
| BPolygon | ( | const BAreaGeoPtr & | pGeo | ) |
| virtual ~BPolygon | ( | ) | [inline, virtual] |
Destructor.
| void AddPoint | ( | const BPoint & | pt | ) |
| void AddPoints | ( | const BPoints & | pts | ) |
| virtual BGeometry* Clone | ( | void | ) | const [inline, virtual] |
Create a deep-copy of this object.
Implements BGeometry.
Reimplemented in BRectangle, and BRoundRectangle.
| virtual BRect ComputeMBR | ( | ) | const [protected, virtual] |
| virtual size_t ComputeSize | ( | void | ) | const [inline, virtual] |
Computes the size of the BByteArray required to store this object.
Reimplemented from BAreaGeo.
Reimplemented in BRoundRectangle.
| virtual void ComputeStats | ( | ) | const [protected, virtual] |
| virtual bool Contains | ( | const BPoints & | points | ) | const [virtual] |
| virtual bool Contains | ( | const BPoint & | point | ) | const [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 BAreaGeo.
Reimplemented in BRoundRectangle.
| virtual size_t GetCount | ( | void | ) | const [inline, virtual] |
| virtual const BPoint& GetPointAt | ( | size_t | index | ) | const [inline, virtual] |
Gets the BPoint representing the specified vertex.
| index | The zero-based index of the desired vertex. |
| 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 bool IsClosed | ( | void | ) | const [inline, virtual] |
| void SetPoints | ( | const BPoints & | points | ) |
| virtual BByteArray ToByteArray | ( | void | ) | const [virtual] |
Stores this object in a BByteArray.
Reimplemented from BAreaGeo.
Reimplemented in BRoundRectangle.
| 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 [inline, virtual] |
Since a BPolygon is a simple geometry, this method will return a copy of this BPolygon.
| factor | The value used to adjust the number of points in the resulting BPolyline. This parameter is ignored for BPolygon objects. |
Implements BVectorizable.