AGXDynamics
2.31.1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
ImpactAnalysis.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2021. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, are copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or having been
9
advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10
valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx Simulation AB.
15
*/
16
17
#ifndef AGXQT_IMPACTANALYSIS_H
18
#define AGXQT_IMPACTANALYSIS_H
19
20
#include <functional>
21
#include <
agx/PushDisableWarnings.h
>
22
#include <QThread>
23
#include <
agx/PopDisableWarnings.h
>
24
#include <
agxSDK/SimulationController.h
>
25
#include <
agx/GranularDataExporter.h
>
26
27
namespace
agxQt
28
{
29
// Time settings struct. Used in the export function for exporting data in time intervals.
30
struct
TimeSettings
31
{
32
agx::Real
startTime
;
33
agx::Real
endTime
;
34
bool
useSnapShot
;
35
};
36
40
class
ImpactInformationWriter
41
{
42
public
:
43
typedef
std::function<bool(int, double)>
StepforwardCallback
;
44
46
static
bool
writeSimulationDataToFile
(
agx::String
filename,
47
agx::String
sessionName,
48
const
agx::Bound3
& bound,
49
const
TimeSettings
& settings,
50
agx::GranularDataExporter::ExporterDataType
exportType,
51
StepforwardCallback
callback);
52
};
53
55
class
ContactWriterThread
:
public
QThread
56
{
57
Q_OBJECT
58
59
public
:
69
ContactWriterThread
(
agx::GranularDataExporter::ExporterDataType
type
,
agx::String
filename,
agx::String
sessionName,
const
TimeSettings
& timeSettings,
agx::AnalysisBox
* bound);
70
72
void
setExportType
(
agx::GranularDataExporter::ExporterDataType
type);
73
75
void
update
(
agx::String
filename,
agx::String
sessionName,
agx::AnalysisBox
* bound);
76
78
void
setTimeSettings
(
const
TimeSettings
& timeSettings);
79
81
void
reset
();
82
83
// Set if the AnalysisBox should be used in the export.
84
void
setShouldUseBound
(
bool
enable);
85
86
// Get if the AnalysisBox should be used in the export.
87
bool
getShouldUseBound
()
const
;
88
89
public
slots:
90
void
slotAbortThread
();
91
92
signals:
93
void
update
(
int
);
94
void
updateTimeLeft
(
double
);
95
96
protected
:
97
void
run
();
98
100
// Variables
102
public
:
103
bool
m_shouldAbort
;
104
bool
m_running
;
105
protected
:
106
agxSDK::SimulationController
*
m_controller
;
107
agx::String
m_fileName
;
108
agx::String
m_sessionName
;
109
agx::GranularDataExporter::ExporterDataType
m_exportType
;
110
agx::AnalysisBox
*
m_bound
;
111
TimeSettings
m_timeSettings
;
112
bool
m_useBound
;
113
};
114
}
115
116
#endif
agxQt::ContactWriterThread::setTimeSettings
void setTimeSettings(const TimeSettings &timeSettings)
Updates the time settings used in the export thread.
agx::BoundT< Vec3 >
agxQt::ContactWriterThread::updateTimeLeft
void updateTimeLeft(double)
PopDisableWarnings.h
agxQt::ContactWriterThread::m_controller
agxSDK::SimulationController * m_controller
Definition:
ImpactAnalysis.h:106
agxQt::ContactWriterThread::getShouldUseBound
bool getShouldUseBound() const
SimulationController.h
agx::AgXString< std::string >
agxQt::ContactWriterThread::ContactWriterThread
ContactWriterThread(agx::GranularDataExporter::ExporterDataType type, agx::String filename, agx::String sessionName, const TimeSettings &timeSettings, agx::AnalysisBox *bound)
Data Export thread class that opens up the specified journal and writes the specified export informat...
agxQt::ContactWriterThread::m_shouldAbort
bool m_shouldAbort
Definition:
ImpactAnalysis.h:103
agxQt::ContactWriterThread::setShouldUseBound
void setShouldUseBound(bool enable)
agxQt::TimeSettings
Definition:
ImpactAnalysis.h:30
agxQt::TimeSettings::endTime
agx::Real endTime
Definition:
ImpactAnalysis.h:33
agxQt::ContactWriterThread::m_exportType
agx::GranularDataExporter::ExporterDataType m_exportType
Definition:
ImpactAnalysis.h:109
agxQt::TimeSettings::startTime
agx::Real startTime
Definition:
ImpactAnalysis.h:32
agxQt::ContactWriterThread::slotAbortThread
void slotAbortThread()
agx::GranularDataExporter::ExporterDataType
ExporterDataType
Export Data Type.
Definition:
GranularDataExporter.h:65
agxQt::ContactWriterThread::reset
void reset()
Reset the writer thread.
agxQt::ContactWriterThread::m_timeSettings
TimeSettings m_timeSettings
Definition:
ImpactAnalysis.h:111
agxQt::ContactWriterThread
Thread class for writing simulation information to file.
Definition:
ImpactAnalysis.h:55
agxQt::ImpactInformationWriter::StepforwardCallback
std::function< bool(int, double)> StepforwardCallback
Definition:
ImpactAnalysis.h:43
agxQt::ImpactInformationWriter
Class containing utility functions for exporting simulation data.
Definition:
ImpactAnalysis.h:40
agxQt::ContactWriterThread::m_bound
agx::AnalysisBox * m_bound
Definition:
ImpactAnalysis.h:110
agx::AnalysisBox
Class that can be used to extract data from elements in a simulation within a specified bound...
Definition:
AnalysisBox.h:31
agxQt::ContactWriterThread::m_fileName
agx::String m_fileName
Definition:
ImpactAnalysis.h:107
agxQt::ContactWriterThread::m_sessionName
agx::String m_sessionName
Definition:
ImpactAnalysis.h:108
agxSDK::SimulationController
Definition:
SimulationController.h:66
GranularDataExporter.h
agxQt::ContactWriterThread::m_useBound
bool m_useBound
Definition:
ImpactAnalysis.h:112
agxQt::ContactWriterThread::update
void update(agx::String filename, agx::String sessionName, agx::AnalysisBox *bound)
Updates the export information used in the thread.
PushDisableWarnings.h
agxQt::ImpactInformationWriter::writeSimulationDataToFile
static bool writeSimulationDataToFile(agx::String filename, agx::String sessionName, const agx::Bound3 &bound, const TimeSettings &settings, agx::GranularDataExporter::ExporterDataType exportType, StepforwardCallback callback)
Write simulation data to file.
agx::Real
double Real
Definition:
Real.h:42
agxQt::ContactWriterThread::run
void run()
agxQt::TimeSettings::useSnapShot
bool useSnapShot
Definition:
ImpactAnalysis.h:34
agxQt::ContactWriterThread::setExportType
void setExportType(agx::GranularDataExporter::ExporterDataType type)
Set export type of the writing thread.
agxQt::ContactWriterThread::m_running
bool m_running
Definition:
ImpactAnalysis.h:104
type
GLenum type
Definition:
gl.h:5539
include
agxQt
ImpactAnalysis.h
Generated on Mon Mar 21 2022 11:53:01 for AGXDynamics by
1.8.5