GCircle Class Reference

[libgfc Index] [libgfc Hierarchy] [Headers]


Class for circles More...

#include <src/gadt_circle.h>

Inherits: GSpatial

Public Members


Detailed Description

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.


GCircle(const GCircle& other) [public]

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