Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Cell.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2014 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 #ifndef CELL_H
27 #define CELL_H
28 
29 #include "Structure.h"
30 #include "StructuralComponent.h"
31 
32 class CellProperties;
41 class Cell : public Structure , public StructuralComponent {
42  public:
48 
54  Cell(PhysicalModel *myPM, const StructureProperties::GeometricType t, xmlNodePtr n);
55 
61  Cell(PhysicalModel *myPM, const StructureProperties::GeometricType t, const unsigned int ind);
62 
64  virtual ~Cell();
65 
71  void xmlPrint(std::ostream &, const StructuralComponent *);
72 
74  virtual bool isInstanceOf(const char *) const;
75 
82  virtual void deleteAllStructures();
83 
86 
89 
93  bool makePrintData(const StructuralComponent *);
94 
101  virtual bool setIndex(const unsigned int);
102 
106  double* normal();
107 
110 
113 
115  double surface();
116 
118  double volume();
119 
120 
121 
122  private:
124  static unsigned int nextUniqueIndex;
125 
126 };
127 
128 inline bool Cell::isInstanceOf(const char *className) const {
129  return (std::string(className) == std::string("Cell"));
130 }
131 
134 }
135 #endif //CELL_H
StructuralComponent * getTriangleFaces()
Return a new structural component directly representing the Cell as a list of quad faces (when possib...
A cell has an unique index in the physical model object, is composed by atoms, and different basic pr...
Definition: Cell.h:41
static unsigned int nextUniqueIndex
unique number (used to generate unique index for atoms if not given at the instanciation) ...
Definition: Cell.h:124
Pure virtual class that represent an element of the structure.
Definition: Structure.h:43
void xmlPrint(std::ostream &, const StructuralComponent *)
print to an output stream in "pseudo" XML format.
StructuralComponent::ComposedBy composedBy()
overloaded from Structural component, always return StructuralComponent::ATOMS
Definition: Cell.h:132
virtual bool isInstanceOf(const char *) const
return true only if the parameter is equal to "MultiComponent"
Definition: Cell.h:128
virtual void deleteAllStructures()
This method overload the one defined in StructuralComponent.
GeometricType
Geometric type gives information about which kind of geometric representation is the structure...
Definition: StructureProperties.h:107
virtual bool setIndex(const unsigned int)
set the index.
ComposedBy
What this structural component is made of.
Definition: StructuralComponent.h:169
double surface()
Compute the surface of the cell.
double volume()
Compute the volume of the cell.
StructuralComponent * getQuadFaces()
Return a new structural component directly representing the Cell as a list of quad faces (when possib...
double * normal()
compute the normal of the facet Warning : Only available for QUAD and TRIANGLE type cells ...
This is the main class of this project.
Definition: PhysicalModel.h:74
CellProperties * getProperties()
return the property
Cell(PhysicalModel *myPM, const StructureProperties::GeometricType t)
constructor that generates a unique index
A structural component is composed either by cell or by atoms.
Definition: StructuralComponent.h:48
This is an automatically generated class for custom Cell properties.
Definition: CellProperties.h:44
the structural component is made of atoms
Definition: StructuralComponent.h:172
virtual ~Cell()
the destructor, my tailor. BECAREFUL: the atoms should not not be deleted here... ...
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 ...