#include <gcu/crystalatom.h>
Public Member Functions | |
CrystalAtom (CrystalAtom &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== (CrystalAtom &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) |
virtual bool | LoadNode (xmlNodePtr node) |
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 42 of file crystalatom.h.
gcu::CrystalAtom::CrystalAtom | ( | CrystalAtom & | caAtom | ) |
void gcu::CrystalAtom::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 gcu::CrystalAtom::SetDefaultColor | ( | ) |
Gives the atom the default color.
bool gcu::CrystalAtom::HasCustomColor | ( | ) | [inline] |
Definition at line 93 of file crystalatom.h.
References m_bCustomColor.
void gcu::CrystalAtom::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. |
void gcu::CrystalAtom::SetSize | ( | double | r | ) |
r,: | the new value of the atomic radius. |
double gcu::CrystalAtom::GetSize | ( | ) |
bool gcu::CrystalAtom::operator== | ( | CrystalAtom & | caAtom | ) |
caAtom,: | a CrystalAtom instance. |
void gcu::CrystalAtom::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 123 of file crystalatom.h.
References m_nCleave.
double gcu::CrystalAtom::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 gcu::CrystalAtom::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. |
double gcu::CrystalAtom::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. |
double gcu::CrystalAtom::r | ( | ) | [inline] |
Definition at line 162 of file crystalatom.h.
References m_Radius, GcuDimensionalValue::value, and GcuAtomicRadius::value.
const GcuAtomicRadius& gcu::CrystalAtom::GetRadius | ( | ) | [inline] |
Definition at line 166 of file crystalatom.h.
References m_Radius.
void gcu::CrystalAtom::SetRadius | ( | const GcuAtomicRadius & | r | ) |
r,: | a GcuAtomicRadius with the caracteristics of the atom radius. |
bool gcu::CrystalAtom::IsCleaved | ( | ) | [inline] |
Definition at line 174 of file crystalatom.h.
References m_nCleave.
virtual bool gcu::CrystalAtom::SaveNode | ( | xmlDocPtr | xml, | |
xmlNodePtr | node | |||
) | [virtual] |
virtual bool gcu::CrystalAtom::LoadNode | ( | xmlNodePtr | node | ) | [virtual] |
float gcu::CrystalAtom::m_fBlue [protected] |
The blue component of the color of the sphere representing the atom.
Definition at line 193 of file crystalatom.h.
float gcu::CrystalAtom::m_fRed [protected] |
The red component of the color of the sphere representing the atom.
Definition at line 197 of file crystalatom.h.
float gcu::CrystalAtom::m_fGreen [protected] |
The green component of the color of the sphere representing the atom.
Definition at line 201 of file crystalatom.h.
float gcu::CrystalAtom::m_fAlpha [protected] |
The alpha component of the color of the sphere representing the atom.
Definition at line 205 of file crystalatom.h.
bool gcu::CrystalAtom::m_bCustomColor [protected] |
False if the color used is the default color and true if it is a user defined color.
Definition at line 209 of file crystalatom.h.
Referenced by HasCustomColor().
GcuAtomicRadius gcu::CrystalAtom::m_Radius [protected] |
The GcuAtomicRadius containing the radius caracteristics of the atom.
Definition at line 213 of file crystalatom.h.
Referenced by GetRadius(), and r().
int gcu::CrystalAtom::m_nCleave [protected] |
When cleavages (see CrystalCleavage class documentation) are defined, the atom might be cleaved. m_nCleave is the number of CrystalCleavage instances which remove the atom. If this member is not 0, the atom will not be displayed.
Definition at line 219 of file crystalatom.h.
Referenced by Cleave(), and IsCleaved().