Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into 3dviewer
Browse files Browse the repository at this point in the history
Conflicts:
	OMEdit/OMEditGUI/Animation/AnimationWindow.cpp
	OMEdit/OMEditGUI/Animation/AnimationWindow.h
  • Loading branch information
adeas31 committed Dec 22, 2016
2 parents 830a027 + 058097e commit 8e16482
Show file tree
Hide file tree
Showing 10 changed files with 980 additions and 12 deletions.
551 changes: 548 additions & 3 deletions OMEdit/OMEditGUI/Animation/AnimationWindow.cpp

Large diffs are not rendered by default.

71 changes: 69 additions & 2 deletions OMEdit/OMEditGUI/Animation/AnimationWindow.h
Expand Up @@ -39,13 +39,80 @@

class AbstractAnimationWindow;

class AnimationWindow : public AbstractAnimationWindow
#include <QMainWindow>
#include <QToolBar>
#include <QToolButton>
#include <QSlider>
#include <QLineEdit>
#include <QComboBox>
#include <QTimer>

class PlotWindowContainer;
class VisualizerAbstract;
class Label;

class AnimationWindow : public QMainWindow, public osgViewer::CompositeViewer
{
Q_OBJECT
public:
AnimationWindow(QWidget *pParent);
~AnimationWindow();
void createActions();
QWidget* setupViewWidget();
void loadVisualization();
double getTimeFraction();
double getVisTime();
void setPathName(std::string name);
void setFileName(std::string name);
void openAnimationFile(QString fileName);
void openFMUSettingsDialog();
public slots:
void sliderSetTimeSlotFunction(int value);
void playSlotFunction();
void pauseSlotFunction();
void initSlotFunction();
void updateScene();
void renderFrame();
void chooseAnimationFileSlotFunction();
void setSpeedSlotFunction();
void jumpToTimeSlotFunction();
void resetCamera();
void cameraPositionIsometric();
void cameraPositionSide();
void cameraPositionFront();
void cameraPositionTop();
void rotateCameraLeft();
void rotateCameraRight();

double computeDistanceToOrigin();
void setPerspective(int value);
void saveSimSettings();
private:
PlotWindowContainer *mpPlotWindowContainer;
//to be animated
std::string mPathName;
std::string mFileName;
//osg viewer scene
osgViewer::View* mpSceneView;
//stores the data for the shapes, time management, functionality for updating the values(mat/fmu) etc.
VisualizerAbstract* mpVisualizer;
//widgets
QWidget* mpViewerWidget;
QTimer mRenderFrameTimer;
QToolBar* mpAnimationToolBar;
QSlider* mpAnimationSlider;
Label *mpAnimationTimeLabel;
QLineEdit *mpTimeTextBox;
Label *mpAnimationSpeedLabel;
QComboBox *mpSpeedComboBox;
QComboBox *mpPerspectiveDropDownBox;
QToolButton *mpRotateCameraLeftButton;
QToolButton *mpRotateCameraRightButton;
QDialog *mpFMUSettingsDialog;
//actions
QAction *mpAnimationChooseFileAction;
QAction *mpAnimationInitializeAction;
QAction *mpAnimationPlayAction;
QAction *mpAnimationPauseAction;
};

#endif // ANIMATIONWINDOW_H
6 changes: 3 additions & 3 deletions OMEdit/OMEditGUI/Modeling/ModelWidgetContainer.cpp
Expand Up @@ -3345,9 +3345,9 @@ void ModelWidget::writeVisualXMLFile()
visualFile << " <height><exp>0.0025</exp></height>\n";
visualFile << " <extra><exp>0.0</exp></extra>\n";
visualFile << " <color>\n";
visualFile << " <exp>255.0</exp>\n";
visualFile << " <exp>0.0</exp>\n";
visualFile << " <exp>0.0</exp>\n";
visualFile << " <exp>255.0</exp>\n";
visualFile << " </color>\n";
visualFile << " <specCoeff><exp>0.7</exp></specCoeff>\n";
visualFile << " </shape>\n";
Expand Down Expand Up @@ -3391,8 +3391,8 @@ void ModelWidget::writeVisualXMLFile()
visualFile << " <height><exp>0.0025</exp></height>\n";
visualFile << " <extra><exp>0.0</exp></extra>\n";
visualFile << " <color>\n";
visualFile << " <exp>255.0</exp>\n";
visualFile << " <exp>0.0</exp>\n";
visualFile << " <exp>255.0</exp>\n";
visualFile << " <exp>0.0</exp>\n";
visualFile << " </color>\n";
visualFile << " <specCoeff><exp>0.7</exp></specCoeff>\n";
Expand Down Expand Up @@ -3438,8 +3438,8 @@ void ModelWidget::writeVisualXMLFile()
visualFile << " <extra><exp>0.0</exp></extra>\n";
visualFile << " <color>\n";
visualFile << " <exp>0.0</exp>\n";
visualFile << " <exp>255.0</exp>\n";
visualFile << " <exp>0.0</exp>\n";
visualFile << " <exp>255.0</exp>\n";
visualFile << " </color>\n";
visualFile << " <specCoeff><exp>0.7</exp></specCoeff>\n";
visualFile << " </shape>\n";
Expand Down
1 change: 0 additions & 1 deletion OMEdit/OMEditGUI/Resources/icons/play.svg

This file was deleted.

149 changes: 149 additions & 0 deletions OMEdit/OMEditGUI/Resources/icons/rotateCameraLeft.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8e16482

Please sign in to comment.