/usr/include/camitk-3.2/libraries/pml/Cell.h is in libcamitk3-dev 3.2.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | /*****************************************************************************
* $CAMITK_LICENCE_BEGIN$
*
* CamiTK - Computer Assisted Medical Intervention ToolKit
* (c) 2001-2013 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
*
* Visit http://camitk.imag.fr for more information
*
* This file is part of CamiTK.
*
* CamiTK is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* CamiTK is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
*
* $CAMITK_LICENCE_END$
****************************************************************************/
#ifndef CELL_H
#define CELL_H
#include "Structure.h"
#include "StructuralComponent.h"
class CellProperties;
/** 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.
*
*/
class Cell : public Structure , public StructuralComponent {
public:
/** constructor that generates a unique index
* @param myPM the physical model the atom belongs to
* @param t the type of the cell
*/
Cell(PhysicalModel *myPM, const StructureProperties::GeometricType t);
/** constructor from xml node: try to read and get the parameters from xml
* @param myPM the physical model the atom belongs to
* @param t the type of the cell
* @param n the xml node to read to get the information
*/
Cell(PhysicalModel *myPM, const StructureProperties::GeometricType t, xmlNodePtr n);
/** When you know the index of the cell, use this constructor.
* @param myPM the physical model the atom belongs to
* @param t the type of the cell
* @param ind give the unique index
*/
Cell(PhysicalModel *myPM, const StructureProperties::GeometricType t, const unsigned int ind);
/// the destructor, my tailor. BECAREFUL: the atoms should not not be deleted here...
virtual ~Cell();
/** 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).
*/
void xmlPrint(std::ostream &, const StructuralComponent *);
/** return true only if the parameter is equal to "MultiComponent" */
virtual bool isInstanceOf(const char *) const;
/**
* 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
*/
virtual void deleteAllStructures();
/// return the property
CellProperties * getProperties();
/// overloaded from Structural component, always return StructuralComponent::ATOMS
StructuralComponent::ComposedBy composedBy();
/** 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?
*/
bool makePrintData(const StructuralComponent *);
/** set the index.
* The index <b>have to be unique</b> otherwise this method
* has no effect.
* The sub-classes method will check that this index is not in use.
* @return true only if the index of the structure was changed
*/
virtual bool setIndex(const unsigned int);
/** compute the normal of the facet
* Warning : Only available for QUAD and TRIANGLE type cells
*/
double* normal();
/// Return a new structural component directly representing the Cell as a list of quad faces (when possible)
StructuralComponent * getQuadFaces();
/// Return a new structural component directly representing the Cell as a list of quad faces (when possible)
StructuralComponent * getTriangleFaces();
///Compute the surface of the cell
double surface();
/// Compute the volume of the cell
double volume();
private:
/// unique number (used to generate unique index for atoms if not given at the instanciation)
static unsigned int nextUniqueIndex;
};
inline bool Cell::isInstanceOf(const char *className) const {
return (std::string(className) == std::string("Cell"));
}
inline StructuralComponent::ComposedBy Cell::composedBy() {
return StructuralComponent::ATOMS;
}
#endif //CELL_H
|