|
|
| DiscSet2 () |
| | Empty.
|
| | DiscSet2 (const Disc2 &) |
| | Creates a disc set given one disc.
|
| | DiscSet2 (const QVector< Disc2 > &) |
| | Creates a set of discs.
|
| | DiscSet2 (const DiscSet2 &, const Disc2 &) |
| | Creates a set of discs and keep only the subset of discs that intersect the second argument disc.
|
|
| ~DiscSet2 () |
| | Empty.
|
| void | Append (const DiscSet2 &) |
| | Merge with another set of discs.
|
| bool | Intersect (const DiscSet2 &) const |
| | Check if two disc sets intersect.
|
| bool | Inside (const Vector2 &) const |
| | Check if a point is inside or outside the set of discs.
|
|
bool | IsEmpty () const |
| | returns true if the set is empty
|
| double | Signed (const DiscSet2 &) const |
| | Compute the signed distance between two disc sets.
|
|
Box2 | GetBox () const |
| | Compute the bounding box of the set of discs.
|
| Vector2 | Normal (const Vector2 &) const |
| | Computes the normal vector between a point and the disc set.
|
| double | R (const Vector2 &) const |
| | Compute the squared distance between a point and the set of discs.
|
| double | Signed (const Vector2 &) const |
| | Compute the signed distance between a point and the set of discs.
|
| void | Rotate (const Matrix2 &) |
| | Rotates a disc set.
|
| void | Translate (const Vector2 &) |
| | Translates a disc set.
|
| void | Scale (const double &) |
| | Uniformly scales a disc set.
|
| void | Transform (const Frame2 &) |
| | Transforms a disc set given a frame transformation.
|
|
int | Size (void) const |
| | Returns the number of discs.
|
| Disc2 | GetDisc (int) const |
| | Returns a disc by index.
|
| void | RemoveDuplicates (const double &) |
| | Removes discs that are close to or embedded in another disc of the set, whatever their order.
|
| void | Draw (QGraphicsScene &, const QPen &=QPen(), const QBrush &=QBrush()) const |
| | Draw the set of discs.
|
A simple set of discs.
This class implements functions to compute the distance between a point and a set of discs, or the detect whether two set of discs intersect.
| double DiscSet2::Signed |
( |
const DiscSet2 & | set | ) |
const |
Compute the signed distance between two disc sets.
If two discs intersect, the result will be negative. If one of the set is empty, returns 0.0.
Note that, unlike DiscSet2::R(const Vector2&) const, the result is a distance and not a squared distance.
- Parameters
-
- Returns
- The smallest signed distance between a disc of the set and a disc of the argument set.