#include <gcr/line.h>
Public Member Functions | |
Line () | |
virtual | ~Line () |
Line (LineType Type, double X1, double Y1, double Z1, double X2, double Y2, double Z2, double r, float red, float green, float blue, float alpha) | |
Line (Line &clLine) | |
Line & | operator= (Line &clLine) |
double | X1 (void) |
double | Y1 (void) |
double | Z1 (void) |
double | X2 (void) |
double | Y2 (void) |
double | Z2 (void) |
double | Xmax () |
double | Ymax () |
double | Zmax () |
double | Xmin () |
double | Ymin () |
double | Zmin () |
double | Long () |
LineType | Type () |
void | SetPosition (double x, double y, double z, double x1, double y1, double z1) |
void | SetColor (float red, float green, float blue, float alpha) |
void | GetColor (double *red, double *green, double *blue, double *alpha) |
void | SetRadius (double r) |
double | GetRadius () |
bool | operator== (Line &clLine) |
virtual void | Move (double x, double y, double z) |
double | ScalProd (int h, int k, int l) |
void | Cleave () |
void | NetToCartesian (double a, double b, double c, double alpha, double beta, double gamma) |
double | Distance (double x, double y, double z, bool bFixed) |
bool | IsCleaved () |
void | GetRotation (double &x, double &y, double &z, double &th) |
virtual xmlNodePtr | Save (xmlDocPtr xml) const |
virtual bool | Load (xmlNodePtr node) |
Protected Attributes | |
float | m_fBlue |
float | m_fRed |
float | m_fGreen |
float | m_fAlpha |
double | m_dx |
double | m_dy |
double | m_dz |
double | m_dx2 |
double | m_dy2 |
double | m_dz2 |
double | m_dr |
int | m_nCleave |
LineType | m_nType |
Definition at line 54 of file gcr/line.h.
gcr::Line::Line | ( | ) |
The default constructor of Line.
virtual gcr::Line::~Line | ( | ) | [virtual] |
The destructior of CrystaLine
gcr::Line::Line | ( | LineType | Type, | |
double | X1, | |||
double | Y1, | |||
double | Z1, | |||
double | X2, | |||
double | Y2, | |||
double | Z2, | |||
double | r, | |||
float | red, | |||
float | green, | |||
float | blue, | |||
float | alpha | |||
) |
Type,: | the type (LineType) of the new line. | |
X1,: | the x coordinate of the first end of the new line. | |
Y1,: | the y coordinate of the first end of the new line. | |
Z1,: | the z coordinate of the first end of the new line. | |
X2,: | the x coordinate of the second end of the new line. | |
Y2,: | the y coordinate of the second end of the new line. | |
Z2,: | the z coordinate of the second end of the new line. | |
r,: | the radius of the cylinder which will represent the new line. | |
red,: | the red component of the cylinder which will represent the new line. | |
green,: | the green component of the cylinder which will represent the new line. | |
blue,: | the blue component of the cylinder which will represent the new line. | |
alpha,: | the alpha component of the cylinder which will represent the new line. |
gcr::Line::Line | ( | Line & | clLine | ) |
clLine,: | the line to duplicate. |
void gcr::Line::Cleave | ( | ) | [inline] |
Method used to cleave a line. The inverse operation does not exist since the whole crystal must be recalculated after a change in the definition.
Definition at line 221 of file gcr/line.h.
References m_nCleave.
double gcr::Line::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 lines are taken into account. |
void gcr::Line::GetColor | ( | double * | red, | |
double * | green, | |||
double * | blue, | |||
double * | alpha | |||
) |
red,: | a pointer to the location to which the red component of the color of the line will be copied. | |
green,: | a pointer to the location to which the green component of the new color of the line will be copied. | |
blue,: | a pointer to the location to which the blue component of the new color of the line will be copied. | |
alpha,: | a pointer to the location to which the alpha component of the new color of the line will be copied. |
double gcr::Line::GetRadius | ( | void | ) | [inline] |
Definition at line 192 of file gcr/line.h.
References m_dr.
void gcr::Line::GetRotation | ( | double & | x, | |
double & | y, | |||
double & | z, | |||
double & | th | |||
) |
x,: | the x component of the vector of the rotation axis. | |
y,: | the y component of the vector of the rotation axis. | |
z,: | the z component of the vector of the rotation axis. | |
th,: | the angle of the rotation. |
bool gcr::Line::IsCleaved | ( | ) | [inline] |
Definition at line 251 of file gcr/line.h.
References m_nCleave.
virtual bool gcr::Line::Load | ( | xmlNodePtr | node | ) | [virtual] |
node,: | a pointer to the xmlNode containing the serialized line. |
double gcr::Line::Long | ( | ) | [inline] |
virtual void gcr::Line::Move | ( | double | x, | |
double | y, | |||
double | z | |||
) | [virtual] |
x,: | the x component of the transation vector. | |
y,: | the y component of the transation vector. | |
z,: | the z component of the transation vector. |
void gcr::Line::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. |
clLine,: | the line to copy. |
bool gcr::Line::operator== | ( | Line & | clLine | ) |
clLine,: | a Line instance. |
virtual xmlNodePtr gcr::Line::Save | ( | xmlDocPtr | xml | ) | const [virtual] |
xml,: | the xmlDoc used to save the document. |
double gcr::Line::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::Line::SetColor | ( | float | red, | |
float | green, | |||
float | blue, | |||
float | alpha | |||
) |
red,: | the red component of the new color of the line. | |
green,: | the green component of the new color of the line. | |
blue,: | the blue component of the new color of the line. | |
alpha,: | the alpha component of the new color of the line. |
void gcr::Line::SetPosition | ( | double | x, | |
double | y, | |||
double | z, | |||
double | x1, | |||
double | y1, | |||
double | z1 | |||
) |
x,: | the new x coordinate of the first end of the new line. | |
y,: | the new y coordinate of the first end of the new line. | |
z,: | the new z coordinate of the first end of the new line. | |
x1,: | the new x coordinate of the second end of the new line. | |
y1,: | the new y coordinate of the second end of the new line. | |
z1,: | the new z coordinate of the second end of the new line. |
void gcr::Line::SetRadius | ( | double | r | ) |
r,: | the new radius of the cylinder representing the line. |
LineType gcr::Line::Type | ( | ) | [inline] |
Definition at line 153 of file gcr/line.h.
References m_nType.
double gcr::Line::X1 | ( | void | ) | [inline] |
Definition at line 101 of file gcr/line.h.
References m_dx.
double gcr::Line::X2 | ( | void | ) | [inline] |
Definition at line 113 of file gcr/line.h.
References m_dx2.
double gcr::Line::Xmax | ( | ) |
double gcr::Line::Xmin | ( | ) |
double gcr::Line::Y1 | ( | void | ) | [inline] |
Definition at line 105 of file gcr/line.h.
References m_dy.
double gcr::Line::Y2 | ( | void | ) | [inline] |
Definition at line 117 of file gcr/line.h.
References m_dy2.
double gcr::Line::Ymax | ( | ) |
double gcr::Line::Ymin | ( | ) |
double gcr::Line::Z1 | ( | void | ) | [inline] |
Definition at line 109 of file gcr/line.h.
References m_dz.
double gcr::Line::Z2 | ( | void | ) | [inline] |
Definition at line 121 of file gcr/line.h.
References m_dz2.
double gcr::Line::Zmax | ( | ) |
double gcr::Line::Zmin | ( | ) |
double gcr::Line::m_dr [protected] |
The radius of the cylinder representing the line.
Definition at line 320 of file gcr/line.h.
Referenced by GetRadius().
double gcr::Line::m_dx [protected] |
The x coordinate of the first end of the line.
Definition at line 296 of file gcr/line.h.
Referenced by X1().
double gcr::Line::m_dx2 [protected] |
The x coordinate of the second end of the line.
Definition at line 308 of file gcr/line.h.
Referenced by X2().
double gcr::Line::m_dy [protected] |
The y coordinate of the first end of the line.
Definition at line 300 of file gcr/line.h.
Referenced by Y1().
double gcr::Line::m_dy2 [protected] |
The x coordinate of the second end of the line.
Definition at line 312 of file gcr/line.h.
Referenced by Y2().
double gcr::Line::m_dz [protected] |
The z coordinate of the first end of the line.
Definition at line 304 of file gcr/line.h.
Referenced by Z1().
double gcr::Line::m_dz2 [protected] |
The x coordinate of the second end of the line.
Definition at line 316 of file gcr/line.h.
Referenced by Z2().
float gcr::Line::m_fAlpha [protected] |
The alpha component of the color of the cylinder representing the line.
Definition at line 292 of file gcr/line.h.
float gcr::Line::m_fBlue [protected] |
The blue component of the color of the cylinder representing the line.
Definition at line 280 of file gcr/line.h.
float gcr::Line::m_fGreen [protected] |
The green component of the color of the cylinder representing the line.
Definition at line 288 of file gcr/line.h.
float gcr::Line::m_fRed [protected] |
The red component of the color of the cylinder representing the line.
Definition at line 284 of file gcr/line.h.
int gcr::Line::m_nCleave [protected] |
When cleavages (see Cleavage class documentation) are defined, the line might be cleaved. m_nCleave is the number of Cleavage instances which remove the line. If this member is not 0, the line will not be displayed.
Definition at line 326 of file gcr/line.h.
Referenced by Cleave(), and IsCleaved().
LineType gcr::Line::m_nType [protected] |
The type of the Line instance. Possible values are:
Definition at line 335 of file gcr/line.h.
Referenced by Type().