AGX Dynamics  2.35.0.1
GranularReaderWriter.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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 }
#define AGXPHYSICS_EXPORT
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:127
Utility class for reading and writing granular body data to .csv, .agx and .aagx files.
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.
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.
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.
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.
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.
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.
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition: Material.h:388
Vector containing 'raw' data.
Definition: agx/Vector.h:246
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.