![]() |
Computer Assited Medical Intervention Tool Kit
version 3.3
|
A cell has an unique index in the physical model object, is composed by atoms, and different basic properties. More...
#include <Cell.h>
Inheritance diagram for Cell:Public Member Functions | |
| Cell (PhysicalModel *myPM, const StructureProperties::GeometricType t) | |
| constructor that generates a unique index More... | |
| Cell (PhysicalModel *myPM, const StructureProperties::GeometricType t, xmlNodePtr n) | |
| constructor from xml node: try to read and get the parameters from xml More... | |
| Cell (PhysicalModel *myPM, const StructureProperties::GeometricType t, const unsigned int ind) | |
| When you know the index of the cell, use this constructor. More... | |
| StructuralComponent::ComposedBy | composedBy () |
| overloaded from Structural component, always return StructuralComponent::ATOMS More... | |
| virtual void | deleteAllStructures () |
| This method overload the one defined in StructuralComponent. More... | |
| CellProperties * | getProperties () |
| return the property More... | |
| StructuralComponent * | getQuadFaces () |
| Return a new structural component directly representing the Cell as a list of quad faces (when possible) More... | |
| StructuralComponent * | getTriangleFaces () |
| Return a new structural component directly representing the Cell as a list of quad faces (when possible) More... | |
| virtual bool | isInstanceOf (const char *) const |
| return true only if the parameter is equal to "MultiComponent" More... | |
| bool | makePrintData (const StructuralComponent *) |
| is this sc the one that will be the one that will make the cell to print out all its data or is this a sc that will just print out the cell ref? More... | |
| double * | normal () |
| compute the normal of the facet Warning : Only available for QUAD and TRIANGLE type cells More... | |
| virtual bool | setIndex (const unsigned int) |
| set the index. More... | |
| double | surface () |
| Compute the surface of the cell. More... | |
| double | volume () |
| Compute the volume of the cell. More... | |
| void | xmlPrint (std::ostream &, const StructuralComponent *) |
| print to an output stream in "pseudo" XML format. More... | |
| virtual | ~Cell () |
| the destructor, my tailor. BECAREFUL: the atoms should not not be deleted here... More... | |
Public Member Functions inherited from Structure | |
| void | addStructuralComponent (StructuralComponent *) |
| add a particular StructuralComponent in the list More... | |
| std::vector < StructuralComponent * > | getAllStructuralComponents () |
| get the list of all the StructuralComponent that are using this structure More... | |
| unsigned int | getIndex () const |
| get the structure unique index (stored in its property) More... | |
| std::string | getName () const |
| get the name of the structure More... | |
| unsigned int | getNumberOfStructuralComponents () const |
| get the number of StructuralComponent that are using this structure More... | |
| StructuralComponent * | getStructuralComponent (unsigned int i) |
| get a particular StructuralComponent that is using this structure More... | |
| StructureProperties::GeometricType | getType () const |
| get the type of index More... | |
| void | removeStructuralComponent (StructuralComponent *) |
| remove a particular StructuralComponent from the list More... | |
| void | setName (std::string) |
| set the name of the structure More... | |
| virtual void | setPhysicalModel (PhysicalModel *) |
| set the physical model More... | |
| Structure () | |
| Base constructor. More... | |
| virtual | ~Structure () |
| Virtual destructor needed here as this is an abstract class (pure virtual) More... | |
Public Member Functions inherited from StructuralComponent | |
| void | addStructure (Structure *s, bool check=true) |
| Add a Structure in the list (and tells the structure to remove this structural component from its list). More... | |
| bool | addStructureIfNotIn (Structure *s) |
| Add a Structure in the list, only if it is not already in (and tells the structure to remove this structural component from its list). More... | |
| ComposedBy | composedBy () |
| return the type of structure composing the structural component: a structural component is either a list of cells or atoms, or of nothing if it is empty (see enum ComposedBy). More... | |
| StructuralComponent * | getAtoms () |
| Return a StructuralComponent with all the atoms of this structural component. More... | |
| Cell * | getCell (unsigned int) const |
| get cell by order number (not cell index) More... | |
| double * | getColor () const |
| Get the color. More... | |
| void | getColor (double *r, double *g, double *b, double *a) const |
| Get the color by its 4 componants r,g,b and a. More... | |
| RenderingMode::Mode | getMode () const |
| get the rendering mode More... | |
| unsigned int | getNumberOfCells () const |
| get the total nr of cell of the component More... | |
| unsigned int | getNumberOfStructures () const |
| get the number of structures More... | |
| StructuralComponentProperties * | getProperties () |
| get the structural component properties of this SC More... | |
| StructuralComponentProperties::Color | getStructuralComponentPropertiesColor () const |
| Return the color as a code (see StructuralComponentProperties::Color enum) More... | |
| Structure * | getStructure (const unsigned int) const |
| get a structure by its index (fisrt structure is at index 0) More... | |
| Structure * | getStructureByIndex (const unsigned int) |
| get a structure by its unique index More... | |
| Structure * | getStructureByName (const std::string) |
| get a structure by its name More... | |
| bool | isCompatible (Structure *) |
| return true if the given structure is compatible with what composes this structural component. More... | |
| bool | isStructureIn (Structure *s) |
| Check if a given structure is present in the list. More... | |
| virtual bool | isVisible (const RenderingMode::Mode mode) const |
| tell if a specific rendering mode is visible or not More... | |
| void | plannedNumberOfStructures (const unsigned int) |
| optimize the I/O of the std:vector structures. More... | |
| virtual void | removeStructure (Structure *s) |
| Remove a structure from the list (and tells the structure to remove this structural component from its list). More... | |
| void | setColor (const StructuralComponentProperties::Color c) |
| Set the new color (using a StructuralComponentProperties::Color enum) More... | |
| void | setColor (const double r, const double b, const double g, const double a) |
| Set the new RGBA color. More... | |
| void | setColor (const double r, const double b, const double g) |
| Set the new RGB color. More... | |
| void | setMode (const RenderingMode::Mode) |
| set the rendering mode More... | |
| virtual void | setPhysicalModel (PhysicalModel *) |
| set the physical model (recursively to all cells or to all atoms) More... | |
| virtual void | setVisible (const RenderingMode::Mode mode, const bool b) |
| set the visibility of a specific rendering mode More... | |
| StructuralComponent (PhysicalModel *) | |
| Default Constructor. More... | |
| StructuralComponent (PhysicalModel *, xmlNodePtr) | |
| constructor from xml node: try to read and get the parmaters from xml More... | |
| StructuralComponent (PhysicalModel *, std::string) | |
| constructor that allows to name the structure. More... | |
| void | xmlPrint (std::ostream &) const |
| print to an output stream in "pseudo" XML format (do nothing if there are no sub structures). More... | |
| virtual | ~StructuralComponent () |
| delete all the structures (call the deleteAllStructures method) More... | |
Public Member Functions inherited from Component | |
| Component (PhysicalModel *, std::string n="") | |
| Default constructor, a component needs to know the PM it is in. More... | |
| const std::string | getName () const |
| get the name of the component More... | |
| PhysicalModel * | getPhysicalModel () const |
| get the physical model More... | |
| Properties * | getProperties () |
| get the component structural properties (guarantied to be non NULL) More... | |
| bool | isExclusive () const |
| tell if this component is exclusive or not More... | |
| void | setExclusive (const bool) |
| set the exclusive flag More... | |
| void | setName (const std::string) |
| set the name of the component More... | |
| virtual | ~Component () |
| Virtual destructor needed here as this is an abstract class (pure virtual) More... | |
| std::vector< MultiComponent * > | getAllParentMultiComponents () |
| get the list of all the Multi Component that are using this Component More... | |
| unsigned int | getNumberOfParentMultiComponents () const |
| get the number of MultiComponent that are using this Component (= nr of parent component) More... | |
| MultiComponent * | getParentMultiComponent (unsigned int) |
| get a particular MultiComponent that is using this Component (a particular parent component) More... | |
| void | addParentMultiComponent (MultiComponent *) |
| add a particular parent MultiComponent in the list More... | |
| void | removeParentMultiComponent (MultiComponent *) |
| remove a particular parent MultiComponent More... | |
Static Private Attributes | |
| static unsigned int | nextUniqueIndex |
| unique number (used to generate unique index for atoms if not given at the instanciation) More... | |
Additional Inherited Members | |
Public Types inherited from StructuralComponent | |
| enum | ComposedBy { NOTHING, CELLS, ATOMS } |
| What this structural component is made of. More... | |
Protected Member Functions inherited from Component | |
| void | deleteProperties () |
| delete the "properties" pointer and set it to NULL More... | |
| void | removeFromParents () |
| this tell the parent components that this component is removed from memory. More... | |
Protected Attributes inherited from Structure | |
| StructureProperties * | properties |
| Property of the current structure. More... | |
Protected Attributes inherited from StructuralComponent | |
| StructuralComponent * | atomList |
| List of all the atoms of this structural component, build the first time. More... | |
| std::vector< Structure * > | structures |
| List of the structure representing this component, all the structure in this list are either all Atom or all Cell (no mix!) More... | |
Protected Attributes inherited from Component | |
| Properties * | properties |
A cell has an unique index in the physical model object, is composed by atoms, and different basic properties.
It is the most basic component composing a physical model.
| Cell::Cell | ( | PhysicalModel * | myPM, |
| const StructureProperties::GeometricType | t | ||
| ) |
constructor that generates a unique index
| myPM | the physical model the atom belongs to |
| t | the type of the cell |
| Cell::Cell | ( | PhysicalModel * | myPM, |
| const StructureProperties::GeometricType | t, | ||
| xmlNodePtr | n | ||
| ) |
constructor from xml node: try to read and get the parameters from xml
| myPM | the physical model the atom belongs to |
| t | the type of the cell |
| n | the xml node to read to get the information |
| Cell::Cell | ( | PhysicalModel * | myPM, |
| const StructureProperties::GeometricType | t, | ||
| const unsigned int | ind | ||
| ) |
When you know the index of the cell, use this constructor.
| myPM | the physical model the atom belongs to |
| t | the type of the cell |
| ind | give the unique index |
|
virtual |
the destructor, my tailor. BECAREFUL: the atoms should not not be deleted here...
|
inline |
overloaded from Structural component, always return StructuralComponent::ATOMS
References StructuralComponent::ATOMS.
|
virtual |
This method overload the one defined in StructuralComponent.
The difference here is that the atoms composing the cell ARE NOT delete, still the list is cleared. After a call to this method getNumberOfSubStructures() should return 0
Reimplemented from StructuralComponent.
| CellProperties* Cell::getProperties | ( | ) |
return the property
| StructuralComponent* Cell::getQuadFaces | ( | ) |
Return a new structural component directly representing the Cell as a list of quad faces (when possible)
| StructuralComponent* Cell::getTriangleFaces | ( | ) |
Return a new structural component directly representing the Cell as a list of quad faces (when possible)
|
inlinevirtual |
return true only if the parameter is equal to "MultiComponent"
Reimplemented from StructuralComponent.
| bool Cell::makePrintData | ( | const StructuralComponent * | ) |
is this sc the one that will be the one that will make the cell to print out all its data or is this a sc that will just print out the cell ref?
| double* Cell::normal | ( | ) |
compute the normal of the facet Warning : Only available for QUAD and TRIANGLE type cells
|
virtual |
set the index.
The index have to be unique otherwise this method has no effect. The sub-classes method will check that this index is not in use.
Reimplemented from Structure.
| double Cell::surface | ( | ) |
Compute the surface of the cell.
| double Cell::volume | ( | ) |
Compute the volume of the cell.
|
virtual |
print to an output stream in "pseudo" XML format.
If the StructuralComponent that calls this method is not the first in the list of composing SC, then a cellRef tag is printed (otherwise the list of atom is printed).
Implements Structure.
|
staticprivate |
unique number (used to generate unique index for atoms if not given at the instanciation)
1.8.8