AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
agxIO/ReaderWriter.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXIO_READERWRITER_H
18#define AGXIO_READERWRITER_H
19
21#include <string>
22#include <agx/String.h>
23#include <agx/Vec3.h>
24#include <agxSDK/Simulation.h>
25
26namespace agxSDK
27{
28 class Assembly;
29}
30
31namespace agxIO
32{
50 AGXPHYSICS_EXPORT bool readFile(const agx::String& filename, agxSDK::Simulation* simulation,
51 agxSDK::Assembly* parent = nullptr,
53
55 enum FileType {
56 FILETYPE_AGX, /*<! .agx binary format */
57 FILETYPE_AAGX, /*<! .aagx ascii format */
58 FILETYPE_POV /*<! Povray file format */
59 };
60
74 AGXPHYSICS_EXPORT bool writeFile(FileType type, std::ostream& outStream,
75 agxSDK::Simulation* simulation, agx::Vec3 from = agx::Vec3(),
77 double fovy = 0, double aspectRatio = 0 );
78
94 AGXPHYSICS_EXPORT bool writeFile(const agx::String& filename, agxSDK::Simulation* simulation,
95 agx::Vec3 from = agx::Vec3(), agx::Vec3 at = agx::Vec3(),
96 agx::Vec3 up = agx::Vec3(), double fovy = 0, double aspectRatio = 0 );
97
98
99
115
129 AGXPHYSICS_EXPORT bool decompressArchive(const agx::String& archiveFile, const agx::String& directory);
130}
131
132#endif
#define AGXPHYSICS_EXPORT
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints,...
Definition Assembly.h:68
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition Simulation.h:126
The agxIO namespace contains classes for reading, writing and finding files.
Definition Material.h:42
void AGXCORE_EXPORT readFile(agx::String &result, const agx::String &filePath)
AGXPHYSICS_EXPORT bool createCompressedArchive(const agx::String &archiveName, const agx::StringVector &files)
Function which will create a zipped file of name archiveName containing the files listed in files.
FileType
Specify the type of file.
AGXPHYSICS_EXPORT bool decompressArchive(const agx::String &archiveFile, const agx::String &directory)
Function which will de-compress an archive to a target directory.
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.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition Constraint.h:31
uint64_t UInt
Definition Integer.h:27