Core 1.0
ParticleSet Class Reference

Core particle set. More...

#include <particle.h>

Inheritance diagram for ParticleSet:
Dla EdenGrowth

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< VectorGetCenters () 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< Vectorpoints
 Set of particles.
 
double r = 0.0
 Radius of particles.
 

Detailed Description

Core particle set.

The particles have the same radius.

Constructor & Destructor Documentation

◆ ParticleSet() [1/3]

ParticleSet::ParticleSet ( const double & r)
explicit

Create an empty set of particles.

Parameters
rRadius.

◆ ParticleSet() [2/3]

ParticleSet::ParticleSet ( const Vector & p,
const double & r )
explicit

Create a set of particles.

Parameters
rRadius.
pFirst particle.

◆ ParticleSet() [3/3]

ParticleSet::ParticleSet ( const QVector< Vector > & s,
const double & r )
explicit

Create a set of particles.

Parameters
rRadius.
sSet of particles.

Member Function Documentation

◆ Append()

void ParticleSet::Append ( const Vector & p)

Add a new particle to the set.

Parameters
pPoint.

◆ At()

Sphere ParticleSet::At ( int k) const

Get the k-th particle.

Parameters
kIndex.

◆ GetBox()

Box ParticleSet::GetBox ( ) const

Computes the bounding box of the centers of the particles.

See also
GetCircle()

◆ GetSphere()

Sphere ParticleSet::GetSphere ( ) const

Computes the bounding circle of the centers of the particles.

The exact embedding circle can be computed as:

ParticleSet particles;
Circle2 c=particles.GetCircle().Extended(particles.Radius());
Circles in the plane.
Definition circle.h:116
ParticleSet()
Empty constructor.
Definition particle.h:37
double Radius() const
Return the radius of the particles.
Definition particle.h:42

◆ Intersect() [1/2]

bool ParticleSet::Intersect ( const Box & box) const

Check the intersection between the cluster and a box.

Parameters
boxThe box.

◆ Intersect() [2/2]

bool ParticleSet::Intersect ( const Sphere & sphere) const

Check the intersection between the cluster and a circle.

Parameters
sphereThe sphere.