AGX Dynamics  2.37.2.0
Hdf5Exporter.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. 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 AGXIO_HDF5EXPORTER_H
18 #define AGXIO_HDF5EXPORTER_H
19 
20 #include <agx/config/AGX_USE_HDF5.h>
21 #include <agx/config.h>
22 #if AGX_USE_HDF5()
23 
24 #include <agx/AgxH5.h>
26 
27 namespace agxIO
28 {
29 
33  class AGXPHYSICS_EXPORT Hdf5Exporter : public agxSDK::StepEventListener
34  {
35  public:
36 
40  Hdf5Exporter( const agx::String& filename = "data.h5" );
41 
43  virtual void pre( const agx::TimeStamp& /* time */ ) override;
44 
46  virtual void post( const agx::TimeStamp& /* time */ ) override;
47 
48  protected:
52  virtual ~Hdf5Exporter();
53 
54  private:
55  agx::String m_filename;
56  H5::H5File *m_f;
57  H5::Group m_g;
58  };
59 
60 }
61 
62 #endif
63 
64 #endif
65 
Derive from this class to implement a listener for simulation step events.
The agxIO namespace contains classes for reading, writing and finding files.
Definition: Material.h:41
#define AGXPHYSICS_EXPORT
agx::Real TimeStamp
Definition: TimeStamp.h:26