AGX Dynamics  2.37.2.0
GranularReaderWriter.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 #pragma once
18 
19 #include <agx/String.h>
21 
22 namespace agx
23 {
28  {
29  public:
39  static bool writeGranularFile( const agx::String& filename,
40  const agx::Physics::GranularBodyPtrVector& granularBodies,
43 
53  static bool writeGranularFileAGX( const agx::String& filename,
54  const agx::Physics::GranularBodyPtrVector& granularBodies,
57 
67  static bool writeGranularFileCSV( const agx::String& filename,
68  const agx::Physics::GranularBodyPtrVector& granularBodies,
71 
80  static bool loadGranularFileAGX( const agx::String& filename,
84 
94  static bool writeFile( const agx::String& filename,
95  const agx::Physics::GranularBodyPtrVector& granularBodies,
96  agx::RigidBodyPtrVector& rigidBodies,
99 
112  static bool loadFileAGX(
113  const String& filename,
114  agx::Physics::GranularBodyPtrVector& granularBodies,
115  agx::RigidBodyPtrVector& rigidBodies,
117  agxSDK::Simulation* targetSimulation,
118  agx::Material* initMaterial,
120  };
121 }
AGXPHYSICS_EXPORT bool writeFile(FileType type, std::ostream &outStream, agxSDK::Simulation *simulation, agx::Vec3 from=agx::Vec3(), agx::Vec3 at=agx::Vec3(), agx::Vec3 up=agx::Vec3(), double fovy=0, double aspectRatio=0)
Utility function for write a simulation to a stream.
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
#define AGXPHYSICS_EXPORT
Vector containing &#39;raw&#39; data.
Definition: Vector.h:245
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition: Material.h:375
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
Utility class for reading and writing granular body data to .csv, .agx and .aagx files.