Utility class for reading and writing granular body data to .csv, .agx and .aagx files.
More...
#include <GranularReaderWriter.h>
|
| static bool | loadFileAGX (const String &filename, agx::Physics::GranularBodyPtrVector &granularBodies, agx::RigidBodyPtrVector &rigidBodies, Physics::GranularBodySystem *target, agxSDK::Simulation *targetSimulation, agx::Material *initMaterial, const agx::AffineMatrix4x4 &transform=agx::AffineMatrix4x4()) |
| | Loads all granular and rigid bodies in a specified .agx or .aagx file for reading. More...
|
| |
| static bool | loadGranularFileAGX (const agx::String &filename, agx::Physics::GranularBodyPtrVector &granularBodies, agx::Physics::GranularBodySystem *target, const agx::AffineMatrix4x4 &transform=agx::AffineMatrix4x4()) |
| | Loads all granular bodies in a specified .agx or .aagx file for reading. More...
|
| |
| static bool | writeFile (const agx::String &filename, const agx::Physics::GranularBodyPtrVector &granularBodies, agx::RigidBodyPtrVector &rigidBodies, agx::Physics::GranularBodySystem *source, const agx::AffineMatrix4x4 &transform=agx::AffineMatrix4x4()) |
| | Write specified granular and rigid bodies to an .AGX file. More...
|
| |
| static bool | writeGranularFile (const agx::String &filename, const agx::Physics::GranularBodyPtrVector &granularBodies, agx::Physics::GranularBodySystem *source, const agx::AffineMatrix4x4 &transform=agx::AffineMatrix4x4()) |
| | Write specified granular bodies to file with format depending on file extension. More...
|
| |
| static bool | writeGranularFileAGX (const agx::String &filename, const agx::Physics::GranularBodyPtrVector &granularBodies, agx::Physics::GranularBodySystem *source, const agx::AffineMatrix4x4 &transform=agx::AffineMatrix4x4()) |
| | Write specified granular body data to a .agx or .aagx file. More...
|
| |
| static bool | writeGranularFileCSV (const agx::String &filename, const agx::Physics::GranularBodyPtrVector &granularBodies, agx::Physics::GranularBodySystem *source, const agx::AffineMatrix4x4 &transform=agx::AffineMatrix4x4()) |
| | Write specified granular body data to a .agx or .aagx file. More...
|
| |
Utility class for reading and writing granular body data to .csv, .agx and .aagx files.
Definition at line 27 of file GranularReaderWriter.h.
◆ loadFileAGX()
Loads all granular and rigid bodies in a specified .agx or .aagx file for reading.
- Parameters
-
| filename | - The specified name of the file to save granular data to. File ending determines the specified format to save. |
| granularBodies | - The target granular body vector were loaded granulars will be inserted. |
| rigidBodies | - The target rigid body vector were loaded bodies will be inserted. |
| target | - The target granular body system where the loaded granular bodies should be placed. |
| targetSimulation | - The target simulation where the loaded rigid bodies should be added. |
| initMaterial | - The material that will be used to initialize the bodies. |
| transform | - The offset transform that will be applied to body position and velocity upon loading. |
- Returns
- true if the file was successfully loaded, false otherwise.
◆ loadGranularFileAGX()
Loads all granular bodies in a specified .agx or .aagx file for reading.
- Parameters
-
| filename | - The specified name of the file to load granular body data from. |
| granularBodies | - The target granular body vector were loaded granulars will be inserted. |
| target | - The target granular body system the loaded particles should be inserted to. |
| transform | - The offset transform that will be applied to particle position and velocity after loading. |
- Returns
- true if the file was successfully loaded, false otherwise.
◆ writeFile()
Write specified granular and rigid bodies to an .AGX file.
- Parameters
-
| filename | - The specified name of the file to save granular and rigid body data to. |
| granularBodies | - A vector of particles that should be stored to file. |
| rigidBodies | - A vector of rigid bodies that should be stored to file. |
| source | - The source granular body system that contains the specified particles. |
| transform | - The offset transform that will be applied to body position and velocity before writing. |
- Returns
- true if the bodies could be stored to a file, false otherwise.
◆ writeGranularFile()
Write specified granular bodies to file with format depending on file extension.
( Supported: .csv, .agx, aagx )
- Parameters
-
| filename | - The specified name of the file to save granular data to. File ending determines the specified format to save. |
| granularBodies | - A vector of particles that should be stored to file. |
| source | - The source granular body system that contains the specified particles. |
| transform | - The offset transform that will be applied to particle position and velocity before writing. |
- Returns
- true if the granular bodies could be stored to a file, false otherwise.
◆ writeGranularFileAGX()
Write specified granular body data to a .agx or .aagx file.
- Parameters
-
| filename | - The specified name of the file to save granular data to. File ending determines the specified format to save. |
| granularBodies | - A vector of particles that should be stored to file. |
| source | - The source granular body system that contains the specified particles. |
| transform | - The offset transform that will be applied to particle position and velocity before writing. |
- Returns
- true if the granular bodies could be stored to an .agx or .aagx file, false otherwise.
◆ writeGranularFileCSV()
Write specified granular body data to a .agx or .aagx file.
- Parameters
-
| filename | - The specified name of the file to save granular data to. File ending determines the specified format to save. |
| granularBodies | - A vector of particles that should be stored to file. |
| source | - The source granular body system that contains the specified particles. |
| transform | - The offset transform that will be applied to particle position and velocity before writing. |
- Returns
- true if the granular bodies could be stored to a .csv file, false otherwise.
The documentation for this class was generated from the following file: