|
Computer Assited Medical Intervention Tool Kit
version 5.0
|
|
Go to the documentation of this file.
26 #ifndef ATOMPROPERTIES_H
27 #define ATOMPROPERTIES_H
81 virtual void xmlPrint(std::ostream&);
95 void setPosition(
const double,
const double,
const double);
143 #endif // ATOMPROPERTIES_H
Describes the properties common to all structures.
Definition: StructureProperties.h:38
void setPositionPointer(double *ptr, bool update=true)
change the position pointer.
Definition: AtomProperties.cpp:106
void setPosition(const double[3])
set the position of the atom
Definition: AtomProperties.h:131
This class manages all the properties attached to an atom.
Definition: AtomProperties.h:45
An atom has an unique index in the physical model object, a 3D position, and different basic properti...
Definition: Atom.h:49
AtomProperties(PhysicalModel *myPM)
Default constructor : set the position to the origin, and generate an unique index.
Definition: AtomProperties.cpp:44
void xmlToFields(xsd::cxx::tree::attribute_set< char > attrs)
convert the xml node parameters to data fields
Definition: Properties.cpp:41
void allocate()
allocate the memory needed for the position (double[3]).
Definition: AtomProperties.cpp:100
PhysicalModel * myPM
pointer to the physical model the object is in
Definition: Properties.h:136
double * X
Pointer to the memory triplet that stores the atom's position.
Definition: AtomProperties.h:118
bool allocated
true only if the memory used for the position was allocated in the constructor and not changed afterw...
Definition: AtomProperties.h:121
std::string getName() const
get the name (be careful, this method DOES NOT return a copy, so you got the direct ptr to the name!...
Definition: Properties.h:250
This is the main class of this project. Following a nice concept, a physical model is able to represe...
Definition: PhysicalModel.h:86
void setIndex(const unsigned int)
set the index (BECAREFUL: it MUST be unique !!!)
Definition: StructureProperties.h:169
void getPosition(double pos[3]) const
get the position of the atom (array of 3 doubles)
Definition: AtomProperties.h:125
void setName(std::string)
set the name (use the string = operator)
Definition: Properties.h:254
unsigned int index
unique index in the global structure
Definition: StructureProperties.h:178
~AtomProperties() override
the destructor...
Definition: AtomProperties.cpp:93
static unsigned int maxUniqueIndex
unique number (used to generate unique index for atoms if not given at the instantiation)
Definition: AtomProperties.h:109
virtual void xmlPrint(std::ostream &)
print to an output stream in "pseudo" XML format.
Definition: AtomProperties.cpp:129
std::map< std::string, std::string > fields
map containing all the different fields (name, value stored as string )
Definition: Properties.h:129
static void resetUniqueIndex()
Reinitialize the unique index to zero (usually that what you want to do when you start to load a new ...
Definition: AtomProperties.cpp:36