#include <BArc.h>

Public Member Functions | |
| BArc (const BArc &arc) | |
| Copy constructor. | |
| BArc (const BPoint &pt, double xAxis, double yAxis, double rot, double startAng, double endAng, const BPoint &startPt, const BPoint &endPt) | |
| Creates a BArc with the specified parameters. | |
| BArc () | |
| Default constructor, which constructs an BArc that is a single point. | |
| 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 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 of this BArc. | |
| double | GetEndAngle (void) const |
| Gets the angle where this BArc ends. | |
| virtual const BPoint & | GetEndPoint (void) const |
| Gets the point where this BArc ends. | |
| virtual const BPoints & | GetPoints (void) const |
| Get a collection of BPoint objects that represents this BArc. | |
| const BRotation & | GetRotation (void) const |
| Gets the rotation for this BArc. | |
| double | GetRotationAngle (void) const |
| Gets the angle by which this BArc is rotated. | |
| double | GetStartAngle (void) const |
| Gets the angle where this BArc begins. | |
| virtual const BPoint & | GetStartPoint (void) const |
| Gets the point where this BArc begins. | |
| 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 BRect. | |
| virtual bool | IsClockwise (void) const |
| Indicates if this BArc will be drawn clockwise or counter-clockwise. | |
| void | SetCenter (const BPoint &pt) |
| Sets the center point of this BArc. | |
| void | SetEndAngle (double angle) |
| Sets the angle where this BArc ends. | |
| virtual void | SetEndPoint (const BPoint &pt) |
| Sets the point where this BArc ends. | |
| virtual void | SetIsClockwise (bool cw) |
| Sets the indicator of whether or not this BArc shall be drawn clockwise. | |
| void | SetRotation (const BRotation &rot) |
| Sets the roation for this BArc. | |
| void | SetRotationAngle (double angle) |
| Sets the angle by which the arc is rotated. | |
| void | SetStartAngle (double angle) |
| Sets the angle where this BArc begins. | |
| virtual void | SetStartPoint (const BPoint &pt) |
| Sets the point where this BArc begins. | |
| 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 |
| Convert this BArc to a BPolyline that approximates this BArc. | |
| virtual | ~BArc () |
| Destructor. | |
Protected Member Functions | |
| virtual BRect | ComputeMBR () const |
| Computes the minimum bounding rectangle for this BArc. | |
| virtual void | ComputeStats (void) const |
| Calculate the length and MBR of this BArc. | |
Protected Attributes | |
| BPoint | m_center |
| The center point. | |
| double | m_endAngle |
| The angle where this BArc ends. | |
| BPoint | m_endPoint |
| The point where the arc ends. | |
| bool | m_isClockwise |
| Indicates whether or not this BArc is drawn clockwise. | |
| BRotation | m_rotation |
| The angle at which this BArc is rotated. | |
| double | m_startAngle |
| The angle where this BArc starts. | |
| BPoint | m_startPoint |
| The point where this BArc starts. | |
| double | m_xAxis |
| The length of the X-axis. | |
| double | m_yAxis |
| The length of the Y-axis. | |
| BArc | ( | const BPoint & | pt, | |
| double | xAxis, | |||
| double | yAxis, | |||
| double | rot, | |||
| double | startAng, | |||
| double | endAng, | |||
| const BPoint & | startPt, | |||
| const BPoint & | endPt | |||
| ) | [inline] |
Creates a BArc with the specified parameters.
| pt | The center point. | |
| xAxis | The length of the X-axis. | |
| yAxis | The length of the Y-axis. | |
| rot | The rotation angle, in radians. | |
| startAng | The start angle. | |
| endAng | The end angle. | |
| startPt | The start point. | |
| endPt | The end point. |
| virtual ~BArc | ( | ) | [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 BSegment.
| virtual void ComputeStats | ( | void | ) | const [protected, 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 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. |
Reimplemented from BSegment.
| const BPoint& GetCenter | ( | void | ) | const [inline] |
| double GetEndAngle | ( | void | ) | const [inline] |
Gets the angle where this BArc ends.
This angle is measured counter-clockwise from the X-axis (3 o'clock).
| virtual const BPoint& GetEndPoint | ( | void | ) | const [inline, virtual] |
| virtual const BPoints& GetPoints | ( | void | ) | const [virtual] |
Get a collection of BPoint objects that represents this BArc.
Reimplemented from BVectorizable.
| const BRotation& GetRotation | ( | void | ) | const [inline] |
| double GetRotationAngle | ( | void | ) | const [inline] |
| double GetStartAngle | ( | void | ) | const [inline] |
Gets the angle where this BArc begins.
This angle is measured counter-clockwise from the X-axis (3 o'clock).
| virtual const BPoint& GetStartPoint | ( | void | ) | const [inline, 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.
| 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 IsClockwise | ( | void | ) | const [inline, virtual] |
| void SetCenter | ( | const BPoint & | pt | ) |
| void SetEndAngle | ( | double | angle | ) |
Sets the angle where this BArc ends.
This angle is measured counter-clockwise from the X-axis (3 o'clock).
| angle | The angle, in radians. |
| virtual void SetEndPoint | ( | const BPoint & | pt | ) | [virtual] |
| virtual void SetIsClockwise | ( | bool | cw | ) | [inline, virtual] |
| void SetRotation | ( | const BRotation & | rot | ) |
| void SetRotationAngle | ( | double | angle | ) |
Sets the angle by which the arc is rotated.
Use this method when setting the rotation for a BArc that is two-dimensional.
| angle | The rotation angle, in radians. |
| void SetStartAngle | ( | double | angle | ) |
Sets the angle where this BArc begins.
This angle is measured counter-clockwise from the X-axis (3 o'clock).
| angle | The angle, in radians. |
| virtual void SetStartPoint | ( | const BPoint & | pt | ) | [virtual] |
| void SetXAxis | ( | double | axis | ) |
Sets the length of the X-axis.
| axis | The length of the X-axis. |
| void SetYAxis | ( | double | axis | ) |
Sets the length of the Y-axis.
| axis | The length of the Y-axis. |
| virtual BByteArray ToByteArray | ( | void | ) | const [virtual] |
Stores this object in a BByteArray.
Reimplemented from BSegment.
| 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] |
Convert this BArc to a BPolyline that approximates this BArc.
| factor | The value used to adjust the number of points in the resulting BPolyline. The default number of points (1 per degree), will be multiplied by this factor. |
Implements BSegment.
double m_endAngle [protected] |
The angle where this BArc ends.
All BArcs are drawn counter-clockwise.
BPoint m_endPoint [protected] |
The point where the arc ends.
All BArcs are drawn counter-clockwise.
bool m_isClockwise [protected] |
Indicates whether or not this BArc is drawn clockwise.
BRotation m_rotation [protected] |
The angle at which this BArc is rotated.
double m_startAngle [protected] |
The angle where this BArc starts.
All BArcs are drawn counter-clockwise.
BPoint m_startPoint [protected] |
The point where this BArc starts.
All BArcs are drawn counter-clockwise.
double m_xAxis [protected] |
The length of the X-axis.
double m_yAxis [protected] |
The length of the Y-axis.