Circle shape.
More...
#include <Geometry2D.h>
Menge::Math::CircleShape::CircleShape |
( |
const Vector2 & |
center, |
|
|
float |
radius |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
center | The position of the circle's center. |
radius | The radius of the circle. |
Menge::Math::CircleShape::CircleShape |
( |
const CircleShape & |
shape | ) |
|
Copy constructor.
- Parameters
-
shape | The shape to copy from. |
Menge::Math::CircleShape::CircleShape |
( |
const CircleShape & |
shape, |
|
|
const Vector2 & |
offset |
|
) |
| |
Initializes this shape as an translated version of the input shape.
- Parameters
-
shape | The shape to copy from. |
offset | defines an offset from the copied CircleShape for the new CircleShape center |
bool Menge::Math::CircleShape::containsPoint |
( |
const Vector2 & |
pt | ) |
const |
|
virtual |
bool Menge::Math::CircleShape::containsPoint |
( |
const Vector2 & |
pt, |
|
|
const Vector2 & |
pos |
|
) |
| const |
|
virtual |
Determine if the point is inside a circle, centered on the given position.
- Parameters
-
pt | The point to test. |
pos | The position of the circle's center. |
- Returns
- True if the point is inside the shape, false otherwise.
Implements Menge::Math::Geometry2D.
Construct an offset version of this shape.
- Parameters
-
- Returns
- A new CircleShape offset from this one by the vector pt.
void Menge::Math::CircleShape::set |
( |
const Vector2 & |
center, |
|
|
float |
radius |
|
) |
| |
|
inline |
Sets the properties of the circle.
- Parameters
-
center | The circle's center. |
radius | The circle's radius. |
void Menge::Math::CircleShape::setCenter |
( |
const Vector2 & |
center | ) |
|
|
inline |
Sets the center of the circle.
- Parameters
-
center | The circle's center. |
void Menge::Math::CircleShape::setRadius |
( |
float |
radius | ) |
|
|
inline |
Sets the radius of the circle.
- Parameters
-
radius | The circle's radius. |
The documentation for this class was generated from the following files:
- src/menge/MengeCore/Math/Geometry2D.h
- src/menge/MengeCore/Math/Geometry2D.cpp