#include <gcu/crystalview.h>
Public Member Functions | |
CrystalView (CrystalDoc *pDoc) | |
Constructor. | |
virtual | ~CrystalView () |
Destructor. | |
GtkWidget * | CreateNewWidget () |
void | Init (GtkWidget *widget) |
void | Reshape (GtkWidget *widget) |
void | Draw (GtkWidget *widget) |
void | Update () |
void | Update (GtkWidget *widget) |
bool | OnPressed (GtkWidget *widget, GdkEventButton *event) |
void | OnMotion (GtkWidget *widget, GdkEventMotion *event) |
void | OnDestroyed (GtkWidget *widget) |
virtual bool | Load (xmlNodePtr node) |
virtual xmlNodePtr | Save (xmlDocPtr xml) |
Protected Attributes | |
gdouble | m_fAngle |
gdouble | m_fRadius |
gdouble | m_psi |
gdouble | m_theta |
gdouble | m_phi |
gdouble | m_height |
gdouble | m_width |
gdouble | m_near |
gdouble | m_far |
Matrix | m_Euler |
unsigned | m_nGLList |
float | m_fBlue |
float | m_fRed |
float | m_fGreen |
float | m_fAlpha |
CrystalDoc * | m_pDoc |
GtkWidget * | m_pWidget |
Definition at line 44 of file crystalview.h.
gcu::CrystalView::CrystalView | ( | CrystalDoc * | pDoc | ) |
Constructor.
pDoc,: | a pointer to the CrystalDoc instance. |
virtual gcu::CrystalView::~CrystalView | ( | ) | [virtual] |
Destructor.
The destructor of CrystalView.
GtkWidget* gcu::CrystalView::CreateNewWidget | ( | ) |
Creates a widget to display the model as defined in the document and with the parameters of the view. Several widgets cn exist for the same view and their contents are identical.
void gcu::CrystalView::Draw | ( | GtkWidget * | widget | ) |
widget,: | a pointer to a widget created by CreateNewWidget(). |
void gcu::CrystalView::Init | ( | GtkWidget * | widget | ) |
widget,: | a pointer to a widget created by CreateNewWidget(). |
virtual bool gcu::CrystalView::Load | ( | xmlNodePtr | node | ) | [virtual] |
node,: | a pointer to the xmlNode containing the serialized view. |
void gcu::CrystalView::OnDestroyed | ( | GtkWidget * | widget | ) |
widget,: | a pointer to a widget created by CreateNewWidget(). |
void gcu::CrystalView::OnMotion | ( | GtkWidget * | widget, | |
GdkEventMotion * | event | |||
) |
widget,: | a pointer to a widget created by CreateNewWidget(). | |
event,: | a pointer to a GdkEvent. |
bool gcu::CrystalView::OnPressed | ( | GtkWidget * | widget, | |
GdkEventButton * | event | |||
) |
widget,: | a pointer to a widget created by CreateNewWidget(). | |
event,: | a pointer to a GdkEvent. |
void gcu::CrystalView::Reshape | ( | GtkWidget * | widget | ) |
widget,: | a pointer to a widget created by CreateNewWidget(). |
virtual xmlNodePtr gcu::CrystalView::Save | ( | xmlDocPtr | xml | ) | [virtual] |
xml,: | the xmlDoc used to save the document. |
void gcu::CrystalView::Update | ( | GtkWidget * | widget | ) |
widget,: | a pointer to a widget created by CreateNewWidget(). |
void gcu::CrystalView::Update | ( | ) |
Updates all widgets of the view. This method must be called each time the document or the view are modified.
Matrix gcu::CrystalView::m_Euler [protected] |
The gcu::Matrix used to calculate the absolute coordiantes from the positions relative to the crystal.
Definition at line 175 of file crystalview.h.
float gcu::CrystalView::m_fAlpha [protected] |
The alpha component of the background color.
Definition at line 196 of file crystalview.h.
gdouble gcu::CrystalView::m_fAngle [protected] |
he field of view.
Definition at line 139 of file crystalview.h.
float gcu::CrystalView::m_fBlue [protected] |
The blue component of the background color.
Definition at line 184 of file crystalview.h.
float gcu::CrystalView::m_fGreen [protected] |
The green component of the background color.
Definition at line 192 of file crystalview.h.
gdouble gcu::CrystalView::m_fRadius [protected] |
The distance of the center of the model from the viewer.
Definition at line 143 of file crystalview.h.
float gcu::CrystalView::m_fRed [protected] |
The red component of the background color.
Definition at line 188 of file crystalview.h.
gdouble gcu::CrystalView::m_height [protected] |
The height of the widget.
Definition at line 159 of file crystalview.h.
gdouble gcu::CrystalView::m_near [protected] |
The distance of the fore plane delimiting the volume active in the OpenGL representation to the viewer.
Definition at line 167 of file crystalview.h.
unsigned gcu::CrystalView::m_nGLList [protected] |
A GLList used when drawing the model.
Definition at line 179 of file crystalview.h.
CrystalDoc* gcu::CrystalView::m_pDoc [protected] |
A pointer to the CrystalDoc instance containig the definition of the model displayed in the view.
Definition at line 200 of file crystalview.h.
gdouble gcu::CrystalView::m_phi [protected] |
Euler's Phi angle giving the orientaion of the crystal in the view.
Definition at line 155 of file crystalview.h.
gdouble gcu::CrystalView::m_psi [protected] |
Euler's Psi angle giving the orientaion of the crystal in the view.
Definition at line 147 of file crystalview.h.
GtkWidget* gcu::CrystalView::m_pWidget [protected] |
A OpenGL widget where the model is displayed. It is the last one used.
Definition at line 204 of file crystalview.h.
gdouble gcu::CrystalView::m_theta [protected] |
Euler's Theta angle giving the orientaion of the crystal in the view.
Definition at line 151 of file crystalview.h.
gdouble gcu::CrystalView::m_width [protected] |
The width of the widget.
Definition at line 163 of file crystalview.h.