Core 1.0
|
Core particle set in the plane. More...
#include <particle.h>
Public Member Functions | |
ParticleSet2 () | |
Empty constructor. | |
ParticleSet2 (const double &) | |
Create an empty set of particles. More... | |
ParticleSet2 (const Vector2 &, const double &) | |
Create a set of particles. More... | |
ParticleSet2 (const QVector< Vector2 > &, const double &) | |
Create a set of particles. More... | |
Circle2 | At (int) const |
Get the k-th particle. More... | |
double | Radius () const |
Return the radius of the particles. | |
QVector< Vector2 > | GetCenters () const |
Return the centers of the particles. | |
Circle2 | GetCircle () const |
Computes the bounding circle of the centers of the particles. More... | |
bool | Intersect (const Circle2 &) const |
Check the intersection between the cluster and a circle. More... | |
bool | Intersect (const Box2 &) const |
Check the intersection between the cluster and a box. More... | |
void | Draw (QGraphicsScene &) const |
Draw the set of particles. More... | |
Protected Attributes | |
QVector< Vector2 > | points |
Set of particles. | |
double | r |
Radius of particles. | |
Core particle set in the plane.
The particles have the same radius.
|
explicit |
Create an empty set of particles.
r | Radius. |
|
explicit |
Create a set of particles.
r | Radius. |
p | First particle. |
|
explicit |
Create a set of particles.
r | Radius. |
s | Set of particles. |
Circle2 ParticleSet2::At | ( | int | k | ) | const |
Get the k-th particle.
k | Index. |
void ParticleSet2::Draw | ( | QGraphicsScene & | scene | ) | const |
Draw the set of particles.
scene | Graphics scene. |
Circle2 ParticleSet2::GetCircle | ( | ) | const |
Computes the bounding circle of the centers of the particles.
The exact embedding circle can be computed as:
circle | The circle. |
bool ParticleSet2::Intersect | ( | const Box2 & | box | ) | const |
Check the intersection between the cluster and a box.
box | The box. |
bool ParticleSet2::Intersect | ( | const Circle2 & | circle | ) | const |
Check the intersection between the cluster and a circle.
circle | The circle. |