GPoint Class Reference

[libgfc Index] [libgfc Hierarchy] [Headers]


ADT of a geometric point More...

#include <src/gadt_point.h>

Inherits: GSpatial

Public Members


Detailed Description

ADT of a geometric point.

You know what a point is. Note that all the coordinates in GFC

are doubles.


Result input(const char* in) [public virtual]

usr format: "x y"

void genCircle(GCircle& circle, double r) [public]

generate a circle buffer centered at the point.

void genSquare(GRect& rect, double width, double height) [public]

generate a rectangle buffer centered at the point.

double distance() const [public]

get distance to the origion.

double distance(const GPoint& other) const [public]

get distance to another point

double distance(const GSegment& other) const [public]

get distance to another segment

int isInside(const GRect& other) const [public]

check if the point is inside a given rectangle

int isInside(const GCircle& other) const [public]

check if the point is inside a given circle

int isInside(const GTrig& other) const [public]

check if the point is inside a given triangle *not implemented

int isInside(const GPolygon& other) const [public]

check if the point is inside a given polygon

bool equals(const GPoint& a) const [public]

check if the point coincides with another one

friend ostream& operator<<(ostream& s, const GPoint& pnt) [public]

print the point info


Documentation generated by lqian@lqian-sun on Wed Jul 14 09:36:10 EDT 1999
Kdoc