GCircle Class Reference
[libgfc Index] [libgfc Hierarchy]
[Headers]
Class for circles More...
#include <src/gadt_circle.h>
Inherits: GSpatial
Public Members
- GCircle (Coord x, Coord y, double r)
- GCircle ()
- GCircle (const GCircle& other)
- GCircle& operator= (const GCircle& other)
- virtual ~GCircle ()
- virtual GType type (void) const
- virtual uint32 getPSize () const
- virtual Result init (void)
- virtual Result input (const char* in)
- virtual Result output (char*& out)
- virtual Result pack (DataPipe& p)
- virtual Result unpack (DataPipe& p)
- virtual Result mbr (GRect& b) const
- virtual int cmp (const GADT& other) const
- virtual GADT* clone () const
- virtual Result translate (double xf, double yf, double zf=1)
- virtual Result scale (double xf, double yf, double zf=1)
- virtual Result rotate (double, bool)
- virtual Result transform (const GMatrix&)
- double area () const
- double perimeter () const
- void setCntr (Coord _cx, Coord _cy)
- void set (Coord _cx, Coord _cy, double r)
- void setArea (Coord _cx, Coord _cy, double area)
- void setR (double rad)
- Coord getCX () const
- Coord getCY () const
- double getR () const
- bool equals (GCircle& other) const
- void centroid (Coord& x, Coord& y)
- virtual int covers (const GSpatial& a) const
- virtual int intersects (const GSpatial& a) const
Class for circles.
This is a circle class. A circle consists of the center (x,y) and the
radius. You can use it with other spatial ADTs through the
commonly defined methods such as intersects or
covers, isInside , etc.
copy constructor
double area() const [public]
calculate and return the area
double perimeter() const [public]
calculate and return the preimeter
void setCntr(Coord _cx, Coord _cy) [public]
set the center point
void set(Coord _cx, Coord _cy, double r) [public]
set the center point and the radius
void setArea(Coord _cx, Coord _cy, double area) [public]
given the center and area; calculate the radius
void setR(double rad) [public]
set radius
Coord getCX() const [public]
retrieving center and the radius
bool equals(GCircle& other) const [public]
comparing with another circle
void centroid(Coord& x, Coord& y) [public]
return the centroid, which is the center
int covers(const GSpatial& a) const [public virtual]
check it this object covers another spatial ADT 0bject
int intersects(const GSpatial& a) const [public virtual]
check if this object intersects another spatial ADT object
Documentation generated by lqian@lqian-sun on Wed Jul 14 09:36:10 EDT 1999
|
Kdoc
|