class Circle2D

This class is designed to handle a 2D circle

Inheritance:


Public Fields

[more]int n
number of vertex points
[more]Point2D* V
array of points with V[n]=V[0], V[n+1]=V[1]
[more]Point2D center
center of the circle
[more]real radius
radius of the circle

Public Methods

[more] constructors
[more]virtual ~Circle2D()
destructor
[more]void reset(int xc_, int yc_, real radius_)
reset a circle from 1 point given as 2 integers and a radius
[more]void reset(sPoint2D center_, real radius_)
reset a circle from 1 point and a radius
[more]virtual void saveXFile(XFile* file)
save the circle
[more]virtual void loadXFile(XFile* file)
load a circle
[more]virtual const char* sprint()
return the circle into a string
[more]virtual void draw(Image* image_, Color color_)
draw the circle in an image
[more]virtual void xdraw(Display* pDisplay_, Pixmap pixmap_, GC gc_, unsigned long color_)
draw the circle on a X11 display
[more]int wn_PnPoly(Point2D P_)
test the inclusion of a point into the circle


Inherited from geomObject:

Public Fields

obool verbose


Documentation

This class is designed to handle a 2D circle

oint n
number of vertex points

oPoint2D* V
array of points with V[n]=V[0], V[n+1]=V[1]

oPoint2D center
center of the circle

oreal radius
radius of the circle

o constructors

o Circle2D()
empty constructor

o Circle2D(int xc_, int yc_, real radius_)
creates a circle from 1 point given as 2 integers and a radius

o Circle2D(sPoint2D center_, real radius_)
creates a circle from 1 point and a radius

ovirtual ~Circle2D()
destructor

ovoid reset(int xc_, int yc_, real radius_)
reset a circle from 1 point given as 2 integers and a radius

ovoid reset(sPoint2D center_, real radius_)
reset a circle from 1 point and a radius

ovirtual void saveXFile(XFile* file)
save the circle

ovirtual void loadXFile(XFile* file)
load a circle

ovirtual const char* sprint()
return the circle into a string

ovirtual void draw(Image* image_, Color color_)
draw the circle in an image

ovirtual void xdraw(Display* pDisplay_, Pixmap pixmap_, GC gc_, unsigned long color_)
draw the circle on a X11 display

oint wn_PnPoly(Point2D P_)
test the inclusion of a point into the circle

This method uses the winding number test. You can find the original algorithm here.

Parameters:
P_ - is a point,
Returns:
the winding number (=0 only if P_ is outside V)
Author:
Dan Sunday (http:www.softsurfer.com/)


This class has no child classes.
Author:
Sebastien Marcel (marcel@idiap.ch)
Version:
2.0 Fri 15 Jul 2005 11:35:19 AM CEST
Since:
1.0

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.