Commit d94dbe26 authored by Jan Möbius's avatar Jan Möbius
Browse files

More scripting functions for view controls

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5366 383ad7c9-94d9-4d36-a494-682f7c89f535
parent fcf5b567
......@@ -930,6 +930,40 @@ void ViewControlPlugin::setEyePosition(Vector _eye){
emit log(LOGERR, "not yet implemented");
}
void ViewControlPlugin::viewAll() {
PluginFunctions::viewAll();
}
void ViewControlPlugin::viewAll(int _viewer) {
PluginFunctions::viewAll(_viewer);
}
void ViewControlPlugin::viewHome() {
PluginFunctions::viewHome();
}
void ViewControlPlugin::viewHome(int _viewer) {
PluginFunctions::viewHome(_viewer);
}
void ViewControlPlugin::orthographicProjection() {
PluginFunctions::orthographicProjection();
}
void ViewControlPlugin::orthographicProjection(int _viewer) {
PluginFunctions::orthographicProjection( _viewer );
}
void ViewControlPlugin::perspectiveProjection() {
PluginFunctions::perspectiveProjection();
}
void ViewControlPlugin::perspectiveProjection(int _viewer) {
PluginFunctions::perspectiveProjection(_viewer);
}
void ViewControlPlugin::setDescriptions() {
emit setSlotDescription("translate(Vector,int)", "Translate Scene",
QString("TranslationVector,Viewer").split(","),
......@@ -955,6 +989,28 @@ void ViewControlPlugin::setDescriptions() {
emit setSlotDescription("setDrawMode(QString)", "Set the drawMode for all viewers",
QStringList("DrawMode"), QStringList("the drawMode ( ; separated list )"));
emit setSlotDescription("viewAll()", "Change View on all viewers to view whole scene",
QStringList(), QStringList());
emit setSlotDescription("viewAll(int)", "Change View on given viewer to view whole scene",
QStringList("Viewer"), QStringList("Id of the viewer to change"));
emit setSlotDescription("viewHome()", "Change View on all viewers to view home position",
QStringList(), QStringList());
emit setSlotDescription("viewHome(int)", "Change View on given viewer to view home position",
QStringList("Viewer"), QStringList("Id of the viewer to change"));
emit setSlotDescription("orthographicProjection()", "Change Viewer to orthographic projection",
QStringList(), QStringList());
emit setSlotDescription("orthographicProjection(int)", "Change all Viewers to orthographic projection",
QStringList("Viewer"), QStringList("Id of the viewer to change"));
emit setSlotDescription("perspectiveProjection()", "Change Viewer to perspective projection",
QStringList(), QStringList());
emit setSlotDescription("perspectiveProjection(int)", "Change all Viewers to perspective projection",
QStringList("Viewer"), QStringList("Id of the viewer to change"));
}
......
......@@ -215,6 +215,35 @@ class ViewControlPlugin : public QObject, BaseInterface , PickingInterface, Logg
void setEyePosition(Vector _eye);
/// Change View on all viewers to view whole scene
void viewAll();
/// Change View on given Viewer to view whole scene
void viewAll(int _viewer);
/// Change View on given Viewer to view home position
void viewHome();
/// Change View on all Viewers to view home position
void viewHome(int _viewer);
/// Change Viewer to orthographicProjection
void orthographicProjection();
/// Change all Viewers to orthographicProjection
void orthographicProjection(int _viewer);
/// Change Viewer to perspectiveProjection
void perspectiveProjection();
/// Change all Viewers to perspectiveProjection
void perspectiveProjection(int _viewer);
};
#endif //ViewControlPlugin_HH
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment