Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages | Examples

fgl::FGCircle Struct Reference

#include <base.h>

Inheritance diagram for fgl::FGCircle:

Inheritance graph
[legend]
Collaboration diagram for fgl::FGCircle:

Collaboration graph
[legend]
List of all members.

Detailed Description

Circle object.


Public Member Functions

 FGCircle ()
 FGCircle (int xpos, int ypos, int radius)
 FGCircle (const FGPoint point, int radius)
bool isValid (void) const
bool isNull (void) const
bool isEmpty (void) const
bool contains (double xc, double yc) const

Public Attributes

FGCOORD r


Constructor & Destructor Documentation

fgl::FGCircle::FGCircle  )  [inline]
 

Constructs an invalid rectangle.

fgl::FGCircle::FGCircle int  xpos,
int  ypos,
int  radius
[inline]
 

Constructs a circle with the top, left corner and width and height.

fgl::FGCircle::FGCircle const FGPoint  point,
int  radius
[inline]
 


Member Function Documentation

bool fgl::FGCircle::contains double  xc,
double  yc
const [inline]
 

Returns TRUE if the point x, y is inside this circle, otherwise returns FALSE.

If proper is TRUE, this function returns TRUE only if the point is entirely inside (not on the edge).

bool fgl::FGCircle::isEmpty void   )  const [inline]
 

Returns TRUE if the circle is empty; otherwise returns FALSE.

An empty circle has a left() > right() or top() > bottom().

An empty circle is not valid. {isEmpty() == !isValid()}

See also:
isNull(), isValid(), normalize()

bool fgl::FGCircle::isNull void   )  const [inline]
 

Returns TRUE if the circle is a null circle; otherwise returns FALSE.

A null rectangle has both the width and the height set to 0, that is right() == left() - 1 and bottom() == top() - 1.

Note that if right() == left() and bottom() == top(), then the circle has width 1 and height 1.

A null circle is also empty.

A null circle is not valid.

See also:
isEmpty(), isValid()

Reimplemented from fgl::FGPoint.

bool fgl::FGCircle::isValid void   )  const [inline]
 

Returns TRUE if the circle is valid; otherwise returns FALSE.

A valid circle has a left() <= right() and top() <= bottom().

Note that non-trivial operations like intersections are not defined for invalid circles.

{isValid() == !isEmpty()}

See also:
isNull(), isEmpty(), normalize()


Generated on Wed Feb 9 11:31:37 2005 for OpenGUI by  doxygen 1.4.0