#include <Circle.hpp>
|
| Circle (const base::Vector2d ¢er, double radius) |
|
| Circle (double centerX, double centerY, double radius) |
|
std::vector< base::Vector2d > | intersect (const Circle &other) const |
|
std::vector< base::Vector2d > | intersect (const Eigen::ParametrizedLine< double, 2 > &line) const |
|
std::vector< base::Vector2d > | samplePoints (double start, double end, size_t num) const |
|
double | getRadius () const |
|
void | setRadius (double radius) |
|
base::Vector2d | getCenter () const |
|
void | setCenter (const base::Vector2d &c) |
|
◆ Circle() [1/2]
Circle::Circle |
( |
const base::Vector2d & |
center, |
|
|
double |
radius |
|
) |
| |
◆ Circle() [2/2]
Circle::Circle |
( |
double |
centerX, |
|
|
double |
centerY, |
|
|
double |
radius |
|
) |
| |
◆ getCenter()
base::Vector2d Circle::getCenter |
( |
| ) |
const |
◆ getRadius()
double Circle::getRadius |
( |
| ) |
const |
◆ intersect() [1/2]
std::vector< base::Vector2d > Circle::intersect |
( |
const Circle & |
other | ) |
const |
Calculate intersection points of this and other
.
- Returns
- a vector containing the intersections or an empty vector if the circles do not intersect or are identical
◆ intersect() [2/2]
std::vector< base::Vector2d > Circle::intersect |
( |
const Eigen::ParametrizedLine< double, 2 > & |
line | ) |
const |
Calculate intersection points of this and line
.
- Returns
- a vector containing the intersections or an empty vector if the line does not intersect the circle.
- Exceptions
-
std::runtime_error | If the line is invalid |
◆ samplePoints()
std::vector<base::Vector2d> numeric::Circle::samplePoints |
( |
double |
start, |
|
|
double |
end, |
|
|
size_t |
num |
|
) |
| const |
Sample points on the circle
- Parameters
-
start | Angle of the first sample (in rad) |
end | Angle of the last sample (in rad) |
num | Total number of samples (including start and end) |
- Note
- If num == 1,
start
is returned
- Exceptions
-
std::runtime_error | if num == 0 |
std::runtime_error | if start == end |
◆ setCenter()
void Circle::setCenter |
( |
const base::Vector2d & |
c | ) |
|
◆ setRadius()
void Circle::setRadius |
( |
double |
radius | ) |
|
◆ Unit()
Create circle with center at 0/0 and radius 1
◆ center
base::Vector2d numeric::Circle::center |
double numeric::Circle::r |
The documentation for this class was generated from the following files:
- /home/dfki.uni-bremen.de/roehr/workspace/2maz/dev/base/numeric/src/Circle.hpp
- /home/dfki.uni-bremen.de/roehr/workspace/2maz/dev/base/numeric/src/Circle.cpp