AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
ImpactAnalysis.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXQT_IMPACTANALYSIS_H
18#define AGXQT_IMPACTANALYSIS_H
19
20#include <functional>
23
25#include <QThread>
27
28namespace agxQt
29{
30 // Time settings struct. Used in the export function for exporting data in time intervals.
37
42 {
43 public:
44 typedef std::function<bool(int, double)> StepforwardCallback;
45
48 agx::String filename,
49 agx::String sessionName,
50 const agx::AnalysisBox* box,
51 const TimeSettings& settings,
53 StepforwardCallback callback);
54 };
55
57 class ContactWriterThread : public QThread
58 {
59 Q_OBJECT
60
61 public:
72 agx::String filename,
73 agx::String sessionName,
74 const TimeSettings& timeSettings,
75 agx::AnalysisBox* box);
76
79
81 void update(agx::String filename,
82 agx::String sessionName,
83 agx::AnalysisBox* box);
84
86 void setTimeSettings(const TimeSettings& timeSettings);
87
89 void reset();
90
91 // Set if the AnalysisBox should be used in the export.
92 void setShouldUseBound(bool enable);
93
94 // Get if the AnalysisBox should be used in the export.
95 bool getShouldUseBound() const;
96
97 public slots:
99
100 signals:
101 void update(int);
102 void updateTimeLeft(double);
103
104 protected:
105 void run();
106
108 // Variables
110 public:
113 protected:
114 agxSDK::SimulationController* m_controller;
121 };
122}
123
124#endif
Thread class for writing simulation information to file.
void setTimeSettings(const TimeSettings &timeSettings)
Updates the time settings used in the export thread.
void reset()
Reset the writer thread.
agxSDK::SimulationController * m_controller
void setShouldUseBound(bool enable)
agx::GranularDataExporter::ExporterDataType m_exportType
bool getShouldUseBound() const
ContactWriterThread(agx::GranularDataExporter::ExporterDataType type, agx::String filename, agx::String sessionName, const TimeSettings &timeSettings, agx::AnalysisBox *box)
Data Export thread class that opens up the specified journal and writes the specified export informat...
void update(agx::String filename, agx::String sessionName, agx::AnalysisBox *box)
Updates the export information used in the thread.
void setExportType(agx::GranularDataExporter::ExporterDataType type)
Set export type of the writing thread.
Class containing utility functions for exporting simulation data.
static bool writeSimulationDataToFile(agx::String filename, agx::String sessionName, const agx::AnalysisBox *box, const TimeSettings &settings, agx::GranularDataExporter::ExporterDataType exportType, StepforwardCallback callback)
Write simulation data to file.
std::function< bool(int, double)> StepforwardCallback
Class that can be used to extract data from elements in a simulation within a specified bound.
Definition AnalysisBox.h:33
Contains classes/utility functions for connecting AGX to QT with OSG.
double Real
Definition Real.h:42