#include <BEllipse.h>

Public Member Functions | |
| BEllipse (const BEllipse &el) | |
| Copy constructor. | |
| BEllipse (const BPoint &pt, const double x, const double y, const double rot) | |
| Constructor. | |
| BEllipse () | |
| Default constructor. | |
| 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 bool | Contains (const BPoint &point) const |
| Determines whether or not the specified point is contained within this BGeometry. | |
| 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 void | FromByteArray (const BByteArray &bytes, size_t &startPos) |
| Initializes an instance of this object from a BByteArray. | |
| const BPoint & | GetCenter (void) const |
| Gets the center point for this BEllipse. | |
| virtual BPoint | GetCentroid () const |
| Retrieves the center point of this ellipse. | |
| virtual const BPoints & | GetPoints (void) const |
| Get a collection of BPoint objects that represents this BEllipse. | |
| BRotation | GetRotation (void) const |
| Get the rotation for the ellipse. | |
| double | GetRotationAngle (void) const |
| Gets the angle by which the ellipse is rotated. | |
| virtual const BVectorizable * | GetVectorizablePtr (void) const |
| Returns an interface that can be used to convert this geometry to a simple geometry. | |
| double | GetXAxis (void) const |
| Gets the length of the X-axis. | |
| double | GetYAxis (void) const |
| Gets the length of the Y-axis. | |
| virtual bool | Intersects (const BRect &rect) const |
| Determines whether or not this BGeometry intersects the specified rectangle. | |
| virtual bool | IsClosed (void) const |
| Indicates whather or not this is a "closed" geometry. | |
| void | SetCenter (const BPoint &pt) |
| Set the center point for this BEllipse. | |
| void | SetRotation (const BRotation &rot) |
| Sets the roation for the ellipse. | |
| void | SetRotationAngle (double angle) |
| Set the angle by which the ellipse is rotated. | |
| void | SetXAxis (double axis) |
| Sets the length of the X-axis. | |
| void | SetYAxis (double axis) |
| Sets the length of the Y-axis. | |
| 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 BEllipse to a BPolygon that approximates this BEllipse. | |
| virtual | ~BEllipse () |
| 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. | |
Protected Attributes | |
| BPoint | m_center |
| The center point. | |
| BRotation | m_rotation |
| The angle at which the ellipse is rotated. | |
| double | m_xAxis |
| The length of the X-axis. | |
| double | m_yAxis |
| The length of the Y-axis. | |
| BEllipse | ( | ) | [inline] |
Default constructor.
This constructs an ellipse with 0-length radii.
Constructor.
| pt | The center point. | |
| x | The length of the X-axis. | |
| y | The length of the Y-axis. | |
| rot | The rotation angle, in radians. |
| virtual ~BEllipse | ( | ) | [inline, virtual] |
Destructor.
| virtual BGeometry* Clone | ( | void | ) | const [inline, virtual] |
| 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.
| virtual void ComputeStats | ( | ) | const [protected, virtual] |
| virtual bool Contains | ( | const BPoint & | point | ) | const [virtual] |
| virtual double DistanceTo | ( | const BPoint & | point | ) | const [virtual] |
| virtual void DoResolveToPoint | ( | const BPoint & | refPt | ) | [virtual] |
| 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.
| const BPoint& GetCenter | ( | void | ) | const [inline] |
| virtual BPoint GetCentroid | ( | ) | const [inline, virtual] |
Retrieves the center point of this ellipse.
Reimplemented from BAreaGeo.
| virtual const BPoints& GetPoints | ( | void | ) | const [virtual] |
Get a collection of BPoint objects that represents this BEllipse.
Reimplemented from BVectorizable.
| BRotation GetRotation | ( | void | ) | const [inline] |
Get the rotation for the ellipse.
This method should be used to get the rotation of an ellipse that exists in a three-dimensional space. To get the rotation for an ellipse in two-dimensions, use the GetRotationAngle method.
| double GetRotationAngle | ( | void | ) | const [inline] |
Gets the angle by which the ellipse is rotated.
This method should be used to get the rotation of an ellipse that exists in a two-dimensional space. To get the rotation for an ellipse in three-dimensions, use the GetRotation method.
| 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.
| double GetXAxis | ( | void | ) | const [inline] |
Gets the length of the X-axis.
| double GetYAxis | ( | void | ) | const [inline] |
Gets the length of the Y-axis.
| virtual bool Intersects | ( | const BRect & | rect | ) | const [virtual] |
| virtual bool IsClosed | ( | void | ) | const [inline, virtual] |
| void SetCenter | ( | const BPoint & | pt | ) |
| void SetRotation | ( | const BRotation & | rot | ) |
Sets the roation for the ellipse.
This method should be used to set the rotation of an ellipse that exists in a three-dimensional space. To set the rotation for an ellipse in two-dimensions, use the SetRotationAngle method.
| rot | The BRotation object that describes the rotation angle. |
| void SetRotationAngle | ( | double | angle | ) |
Set the angle by which the ellipse is rotated.
This method should be used to set the rotation of an ellipse that exists in a two-dimensional space. To set the rotation for an ellipse in three-dimensions, use the SetRotation method.
| angle | The rotation angle, in radians. |
| void SetXAxis | ( | double | axis | ) |
Sets the length of the X-axis.
| axis | The length of the X-axis. The units used to express the length must be the same as the units used to express the location of this BEllipse. |
| void SetYAxis | ( | double | axis | ) |
Sets the length of the Y-axis.
| axis | The length of the Y-axis. The units used to express the length must be the same as the units used to express the location of this BEllipse. |
| virtual BByteArray ToByteArray | ( | void | ) | const [virtual] |
Stores this object in a BByteArray.
Reimplemented from BAreaGeo.
| 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 BEllipse to a BPolygon that approximates this BEllipse.
| factor | The value used to adjust the number of points in the resulting BPolygon. The default number of points (1 per degree), will be multiplied by this factor. |
Implements BVectorizable.
BRotation m_rotation [protected] |
The angle at which the ellipse is rotated.
double m_xAxis [protected] |
The length of the X-axis.
double m_yAxis [protected] |
The length of the Y-axis.