Computer Assited Medical Intervention Tool Kit  version 3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
Cluster Class Reference

class Cluster More...

Public Member Functions

bool addAtom (Atom *)
 add an atom to the cluster if in the given precision (true if added) (update center) More...
 
bool addAtom (Atom *)
 add an atom to the cluster if in the given precision (true if added) (update center) More...
 
 Cluster (double distance)
 create a cluster of this atom, using the given precision More...
 
 Cluster (double distance)
 create a cluster of this atom, using the given precision More...
 
Atom * getAtom (unsigned int id)
 get composing atom by index More...
 
Atom * getAtom (unsigned int id)
 get composing atom by index More...
 
Atom * getCenter ()
 get the center (create if necessary) More...
 
Atom * getCenter ()
 get the center (create if necessary) More...
 
unsigned int nrOfAtoms ()
 get nr of atoms in the cluster More...
 
unsigned int nrOfAtoms ()
 get nr of atoms in the cluster More...
 
 ~Cluster ()
 
 ~Cluster ()
 

Static Public Attributes

static unsigned int atomIndex = 10000
 current atom index for new atoms More...
 

Private Member Functions

void updateCenter ()
 update center position More...
 
void updateCenter ()
 update center position More...
 

Private Attributes

Atom * center
 cluster center More...
 
double distance
 distance precision More...
 
Cell * myCell
 the cluster cell More...
 

Detailed Description

class Cluster

a cluster is a set of point that are nearly at the same place (at a given precision)

Constructor & Destructor Documentation

Cluster::Cluster ( double  distance)

create a cluster of this atom, using the given precision

References atomIndex, distance(), nrOfNewAtoms, and StructureProperties::POLY_VERTEX.

Cluster::~Cluster ( )
Cluster::Cluster ( double  distance)

create a cluster of this atom, using the given precision

Cluster::~Cluster ( )

Member Function Documentation

bool Cluster::addAtom ( Atom *  a)

add an atom to the cluster if in the given precision (true if added) (update center)

References distance(), and Atom::getPosition().

Referenced by insert().

bool Cluster::addAtom ( Atom *  )

add an atom to the cluster if in the given precision (true if added) (update center)

Atom * Cluster::getAtom ( unsigned int  id)

get composing atom by index

Atom* Cluster::getAtom ( unsigned int  id)

get composing atom by index

Atom * Cluster::getCenter ( )

get the center (create if necessary)

Atom* Cluster::getCenter ( )

get the center (create if necessary)

unsigned int Cluster::nrOfAtoms ( )

get nr of atoms in the cluster

unsigned int Cluster::nrOfAtoms ( )

get nr of atoms in the cluster

void Cluster::updateCenter ( )
private

update center position

void Cluster::updateCenter ( )
private

update center position

Member Data Documentation

unsigned int Cluster::atomIndex = 10000
static

current atom index for new atoms

Referenced by Cluster().

Atom * Cluster::center
private

cluster center

double Cluster::distance
private

distance precision

Cell * Cluster::myCell
private

the cluster cell


The documentation for this class was generated from the following files: