#include <gcu/crystaldoc.h>
Public Member Functions | |
| CrystalDoc () | |
| virtual | ~CrystalDoc () |
| void | ParseXMLTree (xmlNode *xml) |
| void | Update () |
| CrystalView * | GetView () |
| bool | IsDirty () |
| virtual void | SetDirty () |
| void | Draw () |
| gdouble | GetMaxDist () |
| virtual CrystalView * | CreateNewView () |
| virtual CrystalAtom * | CreateNewAtom () |
| virtual CrystalLine * | CreateNewLine () |
| virtual CrystalCleavage * | CreateNewCleavage () |
| xmlDocPtr | BuildXMLTree () |
| virtual const char * | GetProgramId () |
Protected Member Functions | |
| void | Init () |
| void | Reinit () |
| virtual bool | LoadNewView (xmlNodePtr node) |
Protected Attributes | |
| gcLattices | m_lattice |
| gdouble | m_a |
| gdouble | m_b |
| gdouble | m_c |
| gdouble | m_alpha |
| gdouble | m_beta |
| gdouble | m_gamma |
| gdouble | m_xmin |
| gdouble | m_ymin |
| gdouble | m_zmin |
| gdouble | m_xmax |
| gdouble | m_ymax |
| gdouble | m_zmax |
| gdouble | m_dDist |
| gboolean | m_bFixedSize |
| CrystalAtomList | AtomDef |
| CrystalAtomList | Atoms |
| CrystalLineList | LineDef |
| CrystalLineList | Lines |
| CrystalCleavageList | Cleavages |
| list< CrystalView * > | m_Views |
| bool | m_bDirty |
| bool | m_bEmpty |
Definition at line 78 of file crystaldoc.h.
| gcu::CrystalDoc::CrystalDoc | ( | ) |
The constructor of CrystalDoc
| virtual gcu::CrystalDoc::~CrystalDoc | ( | ) | [virtual] |
The destructor of CrystalDoc
| xmlDocPtr gcu::CrystalDoc::BuildXMLTree | ( | ) |
Builds the xmlDoc corresponding to the crystal structure.
| virtual CrystalAtom* gcu::CrystalDoc::CreateNewAtom | ( | ) | [virtual] |
Creates a new atom. This method should be overrided by programs deriving a new view class from CrystalAtom.
| virtual CrystalCleavage* gcu::CrystalDoc::CreateNewCleavage | ( | ) | [virtual] |
Creates a new cleavage. This method should be overrided by programs deriving a new line class from CrystalCleavage
| virtual CrystalLine* gcu::CrystalDoc::CreateNewLine | ( | ) | [virtual] |
Creates a new line. This method should be overrided by programs deriving a new view class from CrystalLine.
| virtual CrystalView* gcu::CrystalDoc::CreateNewView | ( | ) | [virtual] |
Creates a view of the document. This method should be overrided by programs deriving a new view class from CrystalView.
| void gcu::CrystalDoc::Draw | ( | ) |
Draws the document using OpenGL primitives.
| gdouble gcu::CrystalDoc::GetMaxDist | ( | ) | [inline] |
Definition at line 125 of file crystaldoc.h.
References m_dDist.
| virtual const char* gcu::CrystalDoc::GetProgramId | ( | ) | [virtual] |
| CrystalView* gcu::CrystalDoc::GetView | ( | ) |
| void gcu::CrystalDoc::Init | ( | ) | [protected] |
Initialize a new CrystalDoc instance.
| bool gcu::CrystalDoc::IsDirty | ( | ) | [inline] |
Definition at line 113 of file crystaldoc.h.
References m_bDirty.
| virtual bool gcu::CrystalDoc::LoadNewView | ( | xmlNodePtr | node | ) | [protected, virtual] |
| node,: | the xmlNode containing the serialized view. |
| void gcu::CrystalDoc::ParseXMLTree | ( | xmlNode * | xml | ) |
| xml,: | a pointer to the root xmlNode of the xmlDoc containing the definition of the crystal. |
CrystalDoc* crystal = new CrystalDoc(); xmlDocPtr doc = xmlParseFile(filename); crystal->ParseXMLTree(doc->children);
| void gcu::CrystalDoc::Reinit | ( | ) | [protected] |
Reinitialize a CrystalDoc instance. Used when loading a file in an already existing document.
| virtual void gcu::CrystalDoc::SetDirty | ( | ) | [virtual] |
Signals the document as modified since the last saving operation.
| void gcu::CrystalDoc::Update | ( | ) |
This method must be called when a new document is loaded or when the definition of the crystal is changed. It recalculates everything and updates all the views.
CrystalAtomList gcu::CrystalDoc::AtomDef [protected] |
List of the atoms in the definition of the crystal
Definition at line 249 of file crystaldoc.h.
CrystalAtomList gcu::CrystalDoc::Atoms [protected] |
List of the atoms displayed.
Definition at line 253 of file crystaldoc.h.
CrystalCleavageList gcu::CrystalDoc::Cleavages [protected] |
List of the cleavages defined.
Definition at line 265 of file crystaldoc.h.
CrystalLineList gcu::CrystalDoc::LineDef [protected] |
List of the lines in the definition of the crystal
Definition at line 257 of file crystaldoc.h.
CrystalLineList gcu::CrystalDoc::Lines [protected] |
List of the lines displayed.
Definition at line 261 of file crystaldoc.h.
gdouble gcu::CrystalDoc::m_a [protected] |
The a parameter of the unit cell.
Definition at line 193 of file crystaldoc.h.
gdouble gcu::CrystalDoc::m_alpha [protected] |
The alpha angle of the unit cell.
Definition at line 205 of file crystaldoc.h.
gdouble gcu::CrystalDoc::m_b [protected] |
The b parameter of the unit cell.
Definition at line 197 of file crystaldoc.h.
bool gcu::CrystalDoc::m_bDirty [protected] |
true if the document has changed since the last saving. Changing the orientation of the model in one of the views is considered as a change.
Definition at line 274 of file crystaldoc.h.
Referenced by IsDirty().
bool gcu::CrystalDoc::m_bEmpty [protected] |
true if the document does not contain anything displayable.
Definition at line 278 of file crystaldoc.h.
gdouble gcu::CrystalDoc::m_beta [protected] |
The beta angle of the unit cell.
Definition at line 209 of file crystaldoc.h.
gboolean gcu::CrystalDoc::m_bFixedSize [protected] |
true if cleavages must not change positions in the view.
Definition at line 245 of file crystaldoc.h.
gdouble gcu::CrystalDoc::m_c [protected] |
The c parameter of the unit cell.
Definition at line 201 of file crystaldoc.h.
gdouble gcu::CrystalDoc::m_dDist [protected] |
The maximum distance between an object and the center.
Definition at line 241 of file crystaldoc.h.
Referenced by GetMaxDist().
gdouble gcu::CrystalDoc::m_gamma [protected] |
The gamma angle of the unit cell.
Definition at line 213 of file crystaldoc.h.
gcLattices gcu::CrystalDoc::m_lattice [protected] |
The Bravais lattice of the crystal.
Definition at line 189 of file crystaldoc.h.
list<CrystalView *> gcu::CrystalDoc::m_Views [protected] |
List of the views of the document.
Definition at line 269 of file crystaldoc.h.
gdouble gcu::CrystalDoc::m_xmax [protected] |
The maximum x coordinate in the representation of the crystal structure.
Definition at line 229 of file crystaldoc.h.
gdouble gcu::CrystalDoc::m_xmin [protected] |
The minimum x coordinate in the representation of the crystal structure.
Definition at line 217 of file crystaldoc.h.
gdouble gcu::CrystalDoc::m_ymax [protected] |
The maximum y coordinate in the representation of the crystal structure.
Definition at line 233 of file crystaldoc.h.
gdouble gcu::CrystalDoc::m_ymin [protected] |
The minimum y coordinate in the representation of the crystal structure.
Definition at line 221 of file crystaldoc.h.
gdouble gcu::CrystalDoc::m_zmax [protected] |
The maximum z coordinate in the representation of the crystal structure.
Definition at line 237 of file crystaldoc.h.
gdouble gcu::CrystalDoc::m_zmin [protected] |
The minimum z coordinate in the representation of the crystal structure.
Definition at line 225 of file crystaldoc.h.
1.4.7