AnimaL |
Tutorial |
Documentation |
#include <MainController.h>
Inheritance diagram for MainController:
Definition at line 28 of file MainController.h.
Public Slots | |
virtual void | doStep () |
virtual void | startStop () |
virtual void | reset () |
virtual void | setAnimStep (int ms) |
virtual void | setDisplayFreq (int hz) |
virtual void | setRealTime (bool b) |
virtual void | fileOpen () |
virtual void | fileInsert (X3DTK::X3D::X3DNode *node) |
virtual void | fileSave () |
virtual void | fileReload () |
virtual void | toolBarSetShown (bool b) |
virtual void | menuBarSetShown (bool b) |
virtual void | clickedRecordButton () |
void | display () |
void | computeBbox () |
void | viewAll () |
Signals | |
void | animationFrequency (int) |
frequency of the doStep() method | |
Public Member Functions | |
MainController (X3DTK::MainScene *mainScene, bool dw) | |
Constructor. | |
X3DTK::Qt::Viewer * | getViewer () |
Delete QMainWindow. | |
X3DTK::MainScene * | getMainScene () |
X3DTK::Qt::X3DTreeQt * | getX3DTreeQt () |
void | setViewer (X3DTK::Qt::Viewer *v) |
Destructor. | |
void | addEngine (animal::Engine *) |
void | fileOpen (const char *filename) |
void | activatedManipMode () |
virtual void | keyPressEvent (QKeyEvent *e) |
Deal with key press event. | |
virtual void | mouseDoubleClickEvent (QMouseEvent *e) |
Deal with mouse double-click event. | |
virtual void | mouseMoveEvent (QMouseEvent *e) |
Deal with mouse move event. | |
virtual void | mousePressEvent (QMouseEvent *e) |
Deal with mouse press event. | |
virtual void | mouseReleaseEvent (QMouseEvent *e) |
Deal with mouse release event. | |
animal::ConstrainedItem * | pickPoint (float origin[3], float direction[3], float threshold) |
void | toggleRecord (bool b) |
void | addNode (X3DTK::X3D::X3DNode *node) |
X3DQtMap & | getX3DQtMap () |
Get the map which links X3DTK::X3D::X3DNode and their respective QWidget. | |
void | removeX3DQtMap (X3DTK::X3DAbstractNode *EN) |
Remove an entry in the map x3dQtMap and delete the corresponding QWidget. | |
QWidget * | createQWidgetController (X3DTK::X3D::X3DNode *node) |
Create one controller QWidget. | |
template<class X3DNode_t> void | defineQWidgetCreationFunction (QWidget *(*createQWidget)(X3DNode_t *, QWidget *)) |
Init the x3dNodeQWidgetMap. | |
void | setX3dDirectory (const std::string &d) |
create a widget | |
std::string | getX3dDirectory () const |
Protected Attributes | |
std::string | x3dDirectory |
default x3d file directory | |
QDockWindow * | w1 |
QDockWindow * | w2 |
Private Types | |
typedef std::map< X3DTK::SFString, QWidget *(*)(X3DTK::X3DAbstractNode *, QWidget *)> | X3DNodeQWidgetMap |
A map which links the type name of an x3d node to its controller qt widget creation function. | |
Private Attributes | |
QString | openFile |
The name of the open file. | |
X3DTK::MainScene * | mainScene |
The main scene which contains X3DTK graphs, i.e. X3D and GL graphs. | |
QTimer * | animTimer |
Timer for the animation. | |
QTime | clock |
Time for real time. | |
bool | realTime |
True when the animation is set to real time. | |
double | animStep |
The time step dt. | |
bool | go |
True when the animation is launched. | |
int | displayStep |
The frame rate. | |
X3DQtMap | x3dQtMap |
The map between X3DTK::X3DTK::X3D::X3DNode and their respective QWidget. | |
X3DNodeQWidgetMap | x3dNodeQWidgetMap |
The map which links the type name of an x3d node to its controller qt widget creation function. |
|
A map which links the type name of an x3d node to its controller qt widget creation function.
Definition at line 194 of file MainController.h. |
|
Constructor.
Definition at line 84 of file MainController.cpp. References animationFrequency(), animStep, animTimer, defineQWidgetCreationFunction(), display(), displayStep, doStep(), go, realTime, X3DTK::MainScene::setMainController(), animal::Engine::setWorld(), w1, and w2. |
|
Definition at line 255 of file MainController.cpp. |
|
Definition at line 161 of file MainController.cpp. References X3DTK::MainScene::addEngine(), and mainScene. |
|
Definition at line 452 of file MainController.cpp. Referenced by X3DTK::Qt::createTransformQWidget(). |
|
frequency of the doStep() method
Referenced by doStep(), and MainController(). |
|
Definition at line 382 of file MainController.cpp. References toggleRecord(). |
|
Definition at line 404 of file MainController.cpp. References X3DTK::MainScene::computeBbox(), and mainScene. Referenced by createQWidgetController(). |
|
Create one controller QWidget.
Definition at line 493 of file MainController.cpp. References computeBbox(), display(), x3dNodeQWidgetMap, and x3dQtMap. Referenced by X3DTK::Qt::X3DTreeQt::displayWidget(). |
|
Init the x3dNodeQWidgetMap.
Definition at line 121 of file MainController.h. References x3dNodeQWidgetMap. Referenced by MainController(). |
|
Definition at line 400 of file MainController.cpp. Referenced by createQWidgetController(), MainController(), and X3DTK::Qt::X3DTreeQt::updateGL(). |
|
Definition at line 169 of file MainController.cpp. References animationFrequency(), animStep, clock, mainScene, X3DTK::MainScene::move(), and realTime. Referenced by keyPressEvent(), MainController(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent(). |
|
Definition at line 299 of file MainController.cpp. References X3DTK::MainScene::load(), and mainScene. Referenced by X3DTK::Qt::X3DTreeQt::insertNode(). |
|
Definition at line 273 of file MainController.cpp. References X3DTK::MainScene::getX3DScene(), X3DTK::MainScene::load(), mainScene, openFile, and x3dDirectory. |
|
Definition at line 268 of file MainController.cpp. |
|
Definition at line 352 of file MainController.cpp. References X3DTK::MainScene::getX3DScene(), X3DTK::MainScene::load(), mainScene, and openFile. |
|
Definition at line 315 of file MainController.cpp. References mainScene, and X3DTK::MainScene::save(). |
|
|
Delete QMainWindow.
Definition at line 42 of file MainController.h. |
|
Definition at line 664 of file MainController.cpp. References x3dDirectory. |
|
Get the map which links X3DTK::X3D::X3DNode and their respective QWidget.
Definition at line 108 of file MainController.h. References x3dQtMap, and X3DQtMap. Referenced by X3DTK::Qt::X3DTreeQt::displayWidget(). |
|
Definition at line 46 of file MainController.h. |
|
Deal with key press event.
Definition at line 548 of file MainController.cpp. References animTimer, doStep(), X3DTK::MainScene::keyPressEvent(), and mainScene. |
|
Definition at line 376 of file MainController.cpp. |
|
Deal with mouse double-click event.
Definition at line 564 of file MainController.cpp. References animTimer, doStep(), mainScene, X3DTK::MainScene::mouseDoubleClickEvent(), and animal::Vec3. |
|
Deal with mouse move event.
Definition at line 584 of file MainController.cpp. References animTimer, doStep(), mainScene, X3DTK::MainScene::mouseMoveEvent(), and animal::Vec3. |
|
Deal with mouse press event.
Definition at line 603 of file MainController.cpp. References animTimer, doStep(), mainScene, X3DTK::MainScene::mousePressEvent(), and animal::Vec3. |
|
Deal with mouse release event.
Definition at line 622 of file MainController.cpp. References animTimer, doStep(), mainScene, X3DTK::MainScene::mouseReleaseEvent(), and animal::Vec3. |
|
Definition at line 643 of file MainController.cpp. References mainScene, and X3DTK::MainScene::pickPoint(). Referenced by X3DTK::Qt::Viewer::mousePressEvent(). |
|
Remove an entry in the map x3dQtMap and delete the corresponding QWidget.
Definition at line 460 of file MainController.cpp. References x3dQtMap. Referenced by X3DTK::MainScene::deleteNode(). |
|
Definition at line 211 of file MainController.cpp. References mainScene, and X3DTK::MainScene::reset(). |
|
Definition at line 218 of file MainController.cpp. References animStep. |
|
Definition at line 225 of file MainController.cpp. References animTimer, displayStep, and go. |
|
Definition at line 243 of file MainController.cpp. |
|
Destructor.
Definition at line 143 of file MainController.cpp. |
|
create a widget Set the default directory for x3d files.
Definition at line 655 of file MainController.cpp. References x3dDirectory. |
|
Definition at line 195 of file MainController.cpp. References animTimer, clock, displayStep, and go. |
|
Definition at line 415 of file MainController.cpp. References recordButton_xpm, and recordButtonDown_xpm. Referenced by clickedRecordButton(), and X3DTK::Qt::ViewerQt::startCapture(). |
|
Definition at line 371 of file MainController.cpp. |
|
Definition at line 408 of file MainController.cpp. |
|
The time step dt.
Definition at line 184 of file MainController.h. Referenced by doStep(), MainController(), and setAnimStep(). |
|
Timer for the animation.
Definition at line 178 of file MainController.h. Referenced by keyPressEvent(), MainController(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), setDisplayFreq(), and startStop(). |
|
Time for real time.
Definition at line 180 of file MainController.h. Referenced by doStep(), setRealTime(), and startStop(). |
|
The frame rate.
Definition at line 188 of file MainController.h. Referenced by MainController(), setDisplayFreq(), and startStop(). |
|
True when the animation is launched.
Definition at line 186 of file MainController.h. Referenced by MainController(), setDisplayFreq(), and startStop(). |
|
The main scene which contains X3DTK graphs, i.e. X3D and GL graphs.
Definition at line 175 of file MainController.h. Referenced by addEngine(), computeBbox(), doStep(), fileInsert(), fileOpen(), fileReload(), fileSave(), keyPressEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), pickPoint(), and reset(). |
|
The name of the open file.
Definition at line 172 of file MainController.h. Referenced by fileOpen(), and fileReload(). |
|
True when the animation is set to real time.
Definition at line 182 of file MainController.h. Referenced by doStep(), MainController(), and setRealTime(). |
|
Definition at line 200 of file MainController.h. Referenced by MainController(). |
|
Definition at line 200 of file MainController.h. Referenced by MainController(). |
|
default x3d file directory
Definition at line 199 of file MainController.h. Referenced by fileOpen(), getX3dDirectory(), and setX3dDirectory(). |
|
The map which links the type name of an x3d node to its controller qt widget creation function.
Definition at line 196 of file MainController.h. Referenced by createQWidgetController(), and defineQWidgetCreationFunction(). |
|
The map between X3DTK::X3DTK::X3D::X3DNode and their respective QWidget.
Definition at line 191 of file MainController.h. Referenced by createQWidgetController(), getX3DQtMap(), and removeX3DQtMap(). |