TwiceAsNice  2019-02-18
Public Member Functions | List of all members
Nice::Circle Class Reference

#include <Circle.h>

Inheritance diagram for Nice::Circle:
Inheritance graph
Collaboration diagram for Nice::Circle:
Collaboration graph

Public Member Functions

 Circle ()
 default constructor Defines a circle at the origin (0,0) with radius 1. More...
 
 Circle (double xpos, double ypos, double radius)
 constructor given center coordinates and radius. More...
 
 Circle (const Nice::PointVar &center, double radius)
 constructor given center coordinates and radius. More...
 
 Circle (const Nice::CircleVar &c)
 
bool contains (const Nice::PointVar &pt) const
 Decide whether a point is inside the circle. More...
 
bool intersects (const Nice::CircleVar &c) const
 Decide whether there is some overlap of this circle with another. More...
 
void moveTo (const Nice::PointVar &c)
 Move the circle to a new center. More...
 
void translate (const Nice::PointVar &c)
 Move the circle by a relative amount. More...
 
double getArea () const
 Compute the area. More...
 
Nice::PointVar getCenter () const
 Compute the area. More...
 
 Circle ()
 
 Circle (double xpos, double ypos, double radius)
 
 Circle (const Nice::PointVar &center, double radius)
 
 Circle (const Nice::CircleVar &c)
 
bool contains (const Nice::PointVar &pt) const
 
bool intersects (const Nice::CircleVar &c) const
 
void moveTo (const Nice::PointVar &c)
 
void translate (const Nice::PointVar &c)
 
double getArea () const
 
Nice::PointVar getCenter () const
 
- Public Member Functions inherited from Nice::CircleVar
bool operator== (const CircleVar &__rhs) const
 
bool operator< (const CircleVar &__rhs) const
 
bool operator!= (const CircleVar &__rhs) const
 
bool operator<= (const CircleVar &__rhs) const
 
bool operator> (const CircleVar &__rhs) const
 
bool operator>= (const CircleVar &__rhs) const
 
bool operator== (const CircleVar &__rhs) const
 
bool operator< (const CircleVar &__rhs) const
 
bool operator!= (const CircleVar &__rhs) const
 
bool operator<= (const CircleVar &__rhs) const
 
bool operator> (const CircleVar &__rhs) const
 
bool operator>= (const CircleVar &__rhs) const
 

Additional Inherited Members

- Public Attributes inherited from Nice::CircleVar
::Ice::Double xp
 
::Ice::Double yp
 
::Ice::Double r
 

Constructor & Destructor Documentation

◆ Circle() [1/8]

Nice::Circle::Circle ( )

default constructor Defines a circle at the origin (0,0) with radius 1.


Since
2017-11-02
Author
R. J. Mathar

◆ Circle() [2/8]

Nice::Circle::Circle ( double  xpos,
double  ypos,
double  radius 
)

constructor given center coordinates and radius.


Parameters
xposx coordinate of the center
yposy coordinate of the center
radiusradius. The radius should be positive to make sense.
Since
2017-11-02
Author
R. J. Mathar

◆ Circle() [3/8]

Nice::Circle::Circle ( const Nice::PointVar center,
double  radius 
)

constructor given center coordinates and radius.


Parameters
centertwo-dimensional coordinates of the center
radiusradius. The radius should be positive to make sense.
Since
2017-11-02
Author
R. J. Mathar

◆ Circle() [4/8]

Nice::Circle::Circle ( const Nice::CircleVar c)

◆ Circle() [5/8]

Nice::Circle::Circle ( )

◆ Circle() [6/8]

Nice::Circle::Circle ( double  xpos,
double  ypos,
double  radius 
)

◆ Circle() [7/8]

Nice::Circle::Circle ( const Nice::PointVar center,
double  radius 
)

◆ Circle() [8/8]

Nice::Circle::Circle ( const Nice::CircleVar c)

Member Function Documentation

◆ contains() [1/2]

bool Nice::Circle::contains ( const Nice::PointVar pt) const

Decide whether a point is inside the circle.


Parameters
ptThe point in question.
Returns
True if the circle contains the point. True if the point is inside the circle.
Since
2017-11-02
Author
R. J. Mathar

◆ contains() [2/2]

bool Nice::Circle::contains ( const Nice::PointVar pt) const

◆ getArea() [1/2]

double Nice::Circle::getArea ( ) const

Compute the area.


Returns
True pi times radius squared.
Since
2017-11-02
Author
R. J. Mathar

◆ getArea() [2/2]

double Nice::Circle::getArea ( ) const

◆ getCenter() [1/2]

Nice::PointVar Nice::Circle::getCenter ( ) const

◆ getCenter() [2/2]

Nice::PointVar Nice::Circle::getCenter ( ) const

Compute the area.


Returns
True pi times radius squared.
Since
2017-11-02
Author
R. J. Mathar

◆ intersects() [1/2]

bool Nice::Circle::intersects ( const Nice::CircleVar c) const

◆ intersects() [2/2]

bool Nice::Circle::intersects ( const Nice::CircleVar c) const

Decide whether there is some overlap of this circle with another.


Parameters
cThe other circle to be intersected with this.
Returns
True if the two circles are closer than the sum their radii.
Since
2017-11-02
Author
R. J. Mathar

◆ moveTo() [1/2]

void Nice::Circle::moveTo ( const Nice::PointVar c)

◆ moveTo() [2/2]

void Nice::Circle::moveTo ( const Nice::PointVar c)

Move the circle to a new center.


Parameters
cThe new center.
Since
2017-11-02
Author
R. J. Mathar

◆ translate() [1/2]

void Nice::Circle::translate ( const Nice::PointVar c)

Move the circle by a relative amount.


Parameters
vThe vector along which the circle is moved.
Since
2017-11-02
Author
R. J. Mathar

◆ translate() [2/2]

void Nice::Circle::translate ( const Nice::PointVar c)

The documentation for this class was generated from the following files: