Core 1.0
|
Core particle set. More...
#include <particle.h>
Public Member Functions | |
ParticleSet () | |
Empty constructor. | |
ParticleSet (const double &) | |
Create an empty set of particles. | |
ParticleSet (const Vector &, const double &) | |
Create a set of particles. | |
ParticleSet (const QVector< Vector > &, const double &) | |
Create a set of particles. | |
int | Size () const |
Return the number of particles. | |
Sphere | At (int) const |
Get the k-th particle. | |
double | Radius () const |
Return the radius of the particles. | |
QVector< Vector > | GetCenters () const |
Return the centers of the particles. | |
Sphere | GetSphere () const |
Computes the bounding circle of the centers of the particles. | |
Box | GetBox () const |
Computes the bounding box of the centers of the particles. | |
void | Append (const Vector &) |
Add a new particle to the set. | |
bool | Intersect (const Sphere &) const |
Check the intersection between the cluster and a circle. | |
bool | Intersect (const Box &) const |
Check the intersection between the cluster and a box. | |
Protected Attributes | |
QVector< Vector > | points |
Set of particles. | |
double | r = 0.0 |
Radius of particles. | |
Core particle set.
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. |
void ParticleSet::Append | ( | const Vector & | p | ) |
Add a new particle to the set.
p | Point. |
Sphere ParticleSet::At | ( | int | k | ) | const |
Get the k-th particle.
k | Index. |
Box ParticleSet::GetBox | ( | ) | const |
Computes the bounding box of the centers of the particles.
Sphere ParticleSet::GetSphere | ( | ) | const |
Computes the bounding circle of the centers of the particles.
The exact embedding circle can be computed as:
bool ParticleSet::Intersect | ( | const Box & | box | ) | const |
Check the intersection between the cluster and a box.
box | The box. |
bool ParticleSet::Intersect | ( | const Sphere & | sphere | ) | const |
Check the intersection between the cluster and a circle.
sphere | The sphere. |