GPoint Class Reference
[libgfc Index] [libgfc Hierarchy]
[Headers]
ADT of a geometric point More...
#include <src/gadt_point.h>
Inherits: GSpatial
Public Members
- NOP GPoint ()
- NOP GPoint (Coord _x, Coord _y, Coord _z=0)
- NOP GPoint (const GPoint& other)
- GPoint& operator= (const GPoint& pnt)
- virtual GType type () 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& box) const
- virtual GADT* clone () const
- virtual int cmp (const GADT& other) const
- virtual Result scale (double xf, double yf, double zf=1)
- virtual Result translate (double xf, double yf, double zf=1)
- virtual Result rotate (double, bool)
- virtual Result transform (const GMatrix&)
- virtual int intersects (const GSpatial& ) const
- virtual int covers (const GSpatial& ) const
- inline Coord getX () const
- inline Coord getY () const
- inline Coord getZ () const
- inline void setX (Coord _x)
- inline void setY (Coord _y)
- inline void setZ (Coord _z)
- inline void set (Coord _x, Coord _y, Coord _z=0)
- void genCircle (GCircle& circle, double r)
- void genSquare (GRect& rect, double width, double height)
- double distance () const
- double distance (const GPoint& other) const
- double distance (const GSegment& other) const
- int isInside (const GRect& other) const
- int isInside (const GCircle& other) const
- int isInside (const GTrig& other) const
- int isInside (const GPolygon& other) const
- bool equals (const GPoint& a) const
- friend ostream& operator<< (ostream& s, const GPoint& pnt)
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
|