Circle Class Reference
An Object representing a circle. More...


Public Member Functions | |
| Circle (const Coordinate ¢er, double radius) | |
| Construct a Circle with a given center and radius. | |
| Circle * | copy () const |
| Returns a copy of this Object. | |
| Object * | transform (const Transformation &) const |
| Return this Object, transformed by the transformation t. | |
| bool | valid () const |
| Returns true if this is a valid Object. | |
| const ObjectType * | type () const |
| Returns the lowermost ObjectType that this object is an instantiation of. | |
| const Coordinate | center () const |
| Return the center of this circle. | |
| double | radius () const |
| Return the radius of this circle. | |
| double | squareRadius () const |
| Return the square radius of this circle. | |
| double | surface () const |
| Return the surface of this circle. | |
| double | circumference () const |
| Return the circumference of this circle. | |
| int | conicType () const |
| Always returns 1, since a circle always is an ellipse. | |
| const ConicCartesianData | cartesianData () const |
| Return the cartesian representation of this conic. | |
| const ConicPolarData | polarData () const |
| Return the polar representation of this conic. | |
| Coordinate | focus1 () const |
| The first focus of a circle is simply its center. | |
| Coordinate | focus2 () const |
| The second focus of a circle is simply its center. | |
| QString | cartesianEquationString (const KigDocument &w) const |
| Return a string containing the cartesian equation of this circle. | |
| QString | simplyCartesianEquationString (const KigDocument &w) const |
| Return a string containing the cartesian equation of this circle. | |
| QString | polarEquationString (const KigDocument &w) const |
| Return a string containing the polar equation of this circle. | |
| bool | equals (const Object &rhs) const |
| Returns true if this Object is equal to rhs. | |
Static Public Member Functions | |
| static const ObjectType * | stype () |
| Returns the ObjectType representing the Circle type. | |
Detailed Description
An Object representing a circle.This class is a subclass of Conic, ensuring that a circle can be used as a conic.
Member Function Documentation
| static const ObjectType* Circle::stype | ( | ) | [static] |
| Circle* Circle::copy | ( | ) | const [virtual] |
| bool Circle::valid | ( | ) | const |
Returns true if this is a valid Object.
If you want to return an invalid Object, you should return an InvalidObject instance.
Reimplemented from Conic.
| const ObjectType* Circle::type | ( | ) | const [virtual] |
Returns the lowermost ObjectType that this object is an instantiation of.
E.g. if you want to get a string containing the internal name of the type of an object, you can do:
tn = object.type().internalName()
Reimplemented from Conic.
| double Circle::squareRadius | ( | ) | const |
Return the square radius of this circle.
Use this in preference to sqr( radius() ).
| QString Circle::cartesianEquationString | ( | const KigDocument & | w | ) | const [virtual] |
Return a string containing the cartesian equation of this circle.
This will be of the form "x^2 + y^2 + a x + b y + c = 0"
Reimplemented from Conic.
| QString Circle::simplyCartesianEquationString | ( | const KigDocument & | w | ) | const |
Return a string containing the cartesian equation of this circle.
This will be of the form "( x - x0 )^2 + ( y - y0 )^2 = r^2"
| QString Circle::polarEquationString | ( | const KigDocument & | w | ) | const [virtual] |
Return a string containing the polar equation of this circle.
This will be of the form "rho = r [centered at p]"
Reimplemented from Conic.
| bool Circle::equals | ( | const Object & | rhs | ) | const [virtual] |
