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 Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
Connection Class Reference

class facet More...

Public Member Functions

 Connection (Atom *, Atom *)
 create a line connection using the given ptrs More...
 
 Connection (Atom *, Atom *, Atom *)
 create a triangular connection using the given ptrs More...
 
 Connection (Atom *, Atom *, Atom *, Atom *)
 create a quad connection using the given ptrs More...
 
void debug ()
 print on stdout More...
 
Atom * getAtom (unsigned int)
 get composing atom by index More...
 
Atom * getCenter ()
 get new atom in the center (create it if not already there More...
 
unsigned int getUsed () const
 get the number of time it is being used More...
 
virtual ~Connection ()
 destructor More...
 

Static Public Member Functions

static void getCenter (Cell *c, double center[3])
 compute coordinates of the center of any kind of cell More...
 

Private Member Functions

void init ()
 initialization More...
 
bool isIn (Atom *) const
 is this atom index present in this connection (no check on the order) More...
 

Private Attributes

Cell * myCell
 the connection equivalent cell More...
 
Atom * n0
 connection center More...
 
unsigned int used
 nr of times the connection is used More...
 

Static Private Attributes

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

Friends

bool equivalent (Connection *, Connection *)
 if it is the same (equivalent) facet, increment used (return true if equivalence) More...
 

Detailed Description

class facet

a connection can either be a line, triangular or quadrangular

1) LINE (line between two atoms in an element)

0 -—+-— 1 n0

1 new atom can be created

2) TRIANGLE (viewed from outside, normal pointing toward user)

     2
   /  \
  /    \

n2 + n0 + n3 / x \ / \ 0--—+--—1 n1 4 new atoms can be created:

QUAD (viewed from outside, normal pointing toward user) n4 3--—+--—2 | | | | n2 + x + n3 | n0 | | | 0--—+--—1 n1 5 new atoms can be created:

Constructor & Destructor Documentation

Connection::Connection ( Atom *  a,
Atom *  b 
)

create a line connection using the given ptrs

References init(), and StructureProperties::LINE.

Connection::Connection ( Atom *  a,
Atom *  b,
Atom *  c 
)

create a triangular connection using the given ptrs

References init(), and StructureProperties::TRIANGLE.

Connection::Connection ( Atom *  a,
Atom *  b,
Atom *  c,
Atom *  d 
)

create a quad connection using the given ptrs

References init(), and StructureProperties::QUAD.

Connection::~Connection ( )
virtual

destructor

Member Function Documentation

void Connection::debug ( )

print on stdout

Atom * Connection::getAtom ( unsigned int  id)

get composing atom by index

Referenced by equivalent().

Atom * Connection::getCenter ( )

get new atom in the center (create it if not already there

Referenced by getNewCenteredAtom(), insert(), and refine().

void Connection::getCenter ( Cell *  c,
double  center[3] 
)
static

compute coordinates of the center of any kind of cell

References StructuralComponent::getNumberOfStructures(), and StructuralComponent::getStructure().

unsigned int Connection::getUsed ( ) const

get the number of time it is being used

void Connection::init ( )
private

initialization

References atomIndex.

bool Connection::isIn ( Atom *  a) const
private

is this atom index present in this connection (no check on the order)

Referenced by equivalent().

Friends And Related Function Documentation

bool equivalent ( Connection *  f1,
Connection *  f2 
)
friend

if it is the same (equivalent) facet, increment used (return true if equivalence)

Member Data Documentation

unsigned int Connection::atomIndex = 20000
staticprivate

current atom index for new atoms

Referenced by init().

Cell* Connection::myCell
private

the connection equivalent cell

Referenced by equivalent().

Atom* Connection::n0
private

connection center

unsigned int Connection::used
private

nr of times the connection is used

Referenced by equivalent().


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