#include <gcr/atom.h>
Public Member Functions | |
Atom () | |
virtual | ~Atom () |
Atom (int Z, double x, double y, double z) | |
Atom (Atom &caAtom) | |
void | SetColor (float red, float green, float blue, float alpha) |
void | SetDefaultColor () |
bool | HasCustomColor () |
void | GetColor (double *red, double *green, double *blue, double *alpha) |
void | SetSize (double r) |
double | GetSize () |
bool | operator== (Atom &caAtom) |
void | Cleave () |
double | ScalProd (int h, int k, int l) |
void | NetToCartesian (double a, double b, double c, double alpha, double beta, double gamma) |
double | Distance (double x, double y, double z, bool bFixed) |
double | r () |
const GcuAtomicRadius & | GetRadius () |
void | SetRadius (const GcuAtomicRadius &r) |
bool | IsCleaved () |
virtual bool | SaveNode (xmlDocPtr xml, xmlNodePtr node) const |
virtual bool | LoadNode (xmlNodePtr node) |
Protected Member Functions | |
bool | SetProperty (unsigned property, char const *value) |
std::string | GetProperty (unsigned property) const |
Protected Attributes | |
float | m_fBlue |
float | m_fRed |
float | m_fGreen |
float | m_fAlpha |
bool | m_bCustomColor |
GcuAtomicRadius | m_Radius |
int | m_nCleave |
Definition at line 45 of file gcr/atom.h.
gcr::Atom::Atom | ( | ) |
The default constructor. Creates an atom with atomic number set to 0.
Reimplemented from gcu::Atom.
virtual gcr::Atom::~Atom | ( | ) | [virtual] |
gcr::Atom::Atom | ( | int | Z, | |
double | x, | |||
double | y, | |||
double | z | |||
) |
Z | the atomic number of the new atom. | |
x | the x coordinate of the new atom. | |
y | the y coordinate of the new atom. | |
z | the z coordinate of the new atom. |
Reimplemented from gcu::Atom.
gcr::Atom::Atom | ( | Atom & | caAtom | ) |
void gcr::Atom::Cleave | ( | ) | [inline] |
Method used to cleave an atom. The inverse operation does not exist since the whole crystal must be recalculated after a change in the definition.
Definition at line 126 of file gcr/atom.h.
References m_nCleave.
double gcr::Atom::Distance | ( | double | x, | |
double | y, | |||
double | z, | |||
bool | bFixed | |||
) |
x,: | the x coordinate of the center. | |
y,: | the y coordinate of the center. | |
z,: | the z coordinate of the center. | |
bFixed,: | tells if cleaved atoms are taken into account. |
void gcr::Atom::GetColor | ( | double * | red, | |
double * | green, | |||
double * | blue, | |||
double * | alpha | |||
) |
red,: | a pointer to the red component. | |
green,: | a pointer to the green component. | |
blue,: | a pointer to the blue component. | |
alpha,: | a pointer to the alpha component. |
std::string gcr::Atom::GetProperty | ( | unsigned | property | ) | const [protected, virtual] |
property | the identity of the property as defined in objprops.h. |
Reimplemented from gcu::Atom.
const GcuAtomicRadius& gcr::Atom::GetRadius | ( | void | ) | [inline] |
Definition at line 169 of file gcr/atom.h.
References m_Radius.
double gcr::Atom::GetSize | ( | ) |
bool gcr::Atom::HasCustomColor | ( | ) | [inline] |
Definition at line 96 of file gcr/atom.h.
References m_bCustomColor.
bool gcr::Atom::IsCleaved | ( | ) | [inline] |
Definition at line 177 of file gcr/atom.h.
References m_nCleave.
virtual bool gcr::Atom::LoadNode | ( | xmlNodePtr | node | ) | [virtual] |
void gcr::Atom::NetToCartesian | ( | double | a, | |
double | b, | |||
double | c, | |||
double | alpha, | |||
double | beta, | |||
double | gamma | |||
) |
a,: | the a parameter of the unit cell. | |
b,: | the b parameter of the unit cell. | |
c,: | the c parameter of the unit cell. | |
alpha,: | the alpha angle of the unit cell. | |
beta,: | the beta angle of the unit cell. | |
gamma,: | the gamma angle of the unit cell. |
bool gcr::Atom::operator== | ( | Atom & | caAtom | ) |
caAtom,: | a Atom instance. |
double gcr::Atom::r | ( | ) | [inline] |
Definition at line 165 of file gcr/atom.h.
References m_Radius, GcuDimensionalValue::value, and GcuAtomicRadius::value.
virtual bool gcr::Atom::SaveNode | ( | xmlDocPtr | xml, | |
xmlNodePtr | node | |||
) | const [virtual] |
double gcr::Atom::ScalProd | ( | int | h, | |
int | k, | |||
int | l | |||
) |
h,: | the h Miller index of a plane. | |
k,: | the k Miller index of a plane. | |
l,: | the l Miller index of a plane. |
void gcr::Atom::SetColor | ( | float | red, | |
float | green, | |||
float | blue, | |||
float | alpha | |||
) |
red,: | the red component of the color. | |
green,: | the green component of the color. | |
blue,: | the blue component of the color. | |
alpha,: | the alpha component of the color. |
void gcr::Atom::SetDefaultColor | ( | ) |
Gives the atom the default color.
bool gcr::Atom::SetProperty | ( | unsigned | property, | |
char const * | value | |||
) | [protected, virtual] |
property | the identity of the property as defined in objprops.h. | |
value | the value of the property as a string. |
Reimplemented from gcu::Atom.
void gcr::Atom::SetRadius | ( | const GcuAtomicRadius & | r | ) |
r,: | a GcuAtomicRadius with the caracteristics of the atom radius. |
void gcr::Atom::SetSize | ( | double | r | ) |
r,: | the new value of the atomic radius. |
bool gcr::Atom::m_bCustomColor [protected] |
False if the color used is the default color and true if it is a user defined color.
Definition at line 212 of file gcr/atom.h.
Referenced by HasCustomColor().
float gcr::Atom::m_fAlpha [protected] |
The alpha component of the color of the sphere representing the atom.
Definition at line 208 of file gcr/atom.h.
float gcr::Atom::m_fBlue [protected] |
The blue component of the color of the sphere representing the atom.
Definition at line 196 of file gcr/atom.h.
float gcr::Atom::m_fGreen [protected] |
The green component of the color of the sphere representing the atom.
Definition at line 204 of file gcr/atom.h.
float gcr::Atom::m_fRed [protected] |
The red component of the color of the sphere representing the atom.
Definition at line 200 of file gcr/atom.h.
int gcr::Atom::m_nCleave [protected] |
When cleavages (see gcr::Cleavage class documentation) are defined, the atom might be cleaved. m_nCleave is the number of gcr::Cleavage instances which remove the atom. If this member is not 0, the atom will not be displayed.
Definition at line 222 of file gcr/atom.h.
Referenced by Cleave(), and IsCleaved().
GcuAtomicRadius gcr::Atom::m_Radius [protected] |
The GcuAtomicRadius containing the radius caracteristics of the atom.
Definition at line 216 of file gcr/atom.h.
Referenced by GetRadius(), and r().