geometric::circle Class Reference

#include <circle.h>

Inheritance diagram for geometric::circle:

Inheritance graph
[legend]
Collaboration diagram for geometric::circle:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 circle ()
 circle (double radius, const cartesian_point &center)
 ~circle ()
double area () const
 Returns the area occupied by the circle.
double circumference () const
 Returns the perimeter for the circle.
double diameter () const
 Returns the length of the circle's bisecting line.
bool inside (const cartesian_point &where) const
 Returns true if the point is inside the circle.
cartesian_point location (const double_angle &where) const
 Returns the point on the circle that is at the angle "where".
cartesian_rectangle dimensions () const
 Returns a bounding box around the circle.
double radius () const
 Half of the circle's diameter.
void radius (double to_set)
 Sets the radius of the circle.
cartesian_point center () const
 The point at the center of the circle.
void center (const cartesian_point &to_set)
 Resets the circle's center.

Detailed Description

Definition at line 33 of file circle.h.


Constructor & Destructor Documentation

geometric::circle::circle (  ) 

Definition at line 29 of file circle.cpp.

geometric::circle::circle ( double  radius,
const cartesian_point center 
)

Definition at line 31 of file circle.cpp.

geometric::circle::~circle (  ) 

Definition at line 34 of file circle.cpp.

References WHACK().


Member Function Documentation

double geometric::circle::area (  )  const

Returns the area occupied by the circle.

Definition at line 36 of file circle.cpp.

References PI_APPROX, and square().

double geometric::circle::circumference (  )  const

Returns the perimeter for the circle.

The circumference is the length of a virtual string around the circle.

Definition at line 40 of file circle.cpp.

References PI_APPROX.

double geometric::circle::diameter (  )  const

Returns the length of the circle's bisecting line.

This is the length of a line segment that is circumscribed by the circle and which passes through the center of the circle.

Definition at line 38 of file circle.cpp.

bool geometric::circle::inside ( const cartesian_point where  )  const

Returns true if the point is inside the circle.

Definition at line 49 of file circle.cpp.

References geometric::point< numeric_type >::distance().

cartesian_point geometric::circle::location ( const double_angle where  )  const

Returns the point on the circle that is at the angle "where".

Definition at line 42 of file circle.cpp.

References geometric::angle< contents >::get(), and geometric::angle< double >::RADIANS.

Referenced by dimensions().

cartesian_rectangle geometric::circle::dimensions (  )  const

Returns a bounding box around the circle.

Reimplemented in ring.

Definition at line 55 of file circle.cpp.

References location(), PI_APPROX, geometric::point< numeric_type >::x(), and geometric::point< numeric_type >::y().

double geometric::circle::radius (  )  const

Half of the circle's diameter.

Definition at line 69 of file circle.cpp.

void geometric::circle::radius ( double  to_set  ) 

Sets the radius of the circle.

Definition at line 71 of file circle.cpp.

cartesian_point geometric::circle::center (  )  const

The point at the center of the circle.

Definition at line 73 of file circle.cpp.

void geometric::circle::center ( const cartesian_point to_set  ) 

Resets the circle's center.

Definition at line 75 of file circle.cpp.


The documentation for this class was generated from the following files:
Generated on Sat Oct 11 04:30:51 2008 for HOOPLE Libraries by  doxygen 1.5.1