AGX Dynamics 2.37.3.3
|
The agxIO namespace contains classes for reading, writing and finding files. More...
Classes | |
class | ArgumentParser |
A small argument parser class. More... | |
class | Environment |
Class for setting search path for locating dynamic libraries, scripts etc. More... | |
struct | FileExtension |
Support mesh file formats. More... | |
class | FilePathContainer |
class for locating files More... | |
class | FileState |
Class for storing and comparing a change date for a file on disk. More... | |
class | FileStateVector |
vector for holding a set of file states, where the vector can be asked if any of the files has been changed. More... | |
struct | FileSystem |
class | Image |
Class to represent Images. More... | |
class | ImageReader |
Base class for ImageReaders. More... | |
class | ImageReaderPNG |
ImageReader for png-files. More... | |
class | KeyEvent |
class | MeshReader |
Class for reading a mesh object from file and extracting vertices, normals and indices for collision detection Notice that this class will read the mesh vertices/indices as is. More... | |
class | MeshReaderOBJ |
Class for reading a Wavefront OBJ file. More... | |
class | PNGImageValueInterpreter |
class | PovExporter |
Class for exporting a simulation into AGX .pov format. More... | |
class | ResourceManager |
Enumerations | |
enum | EventType { EVENT_DOWN , EVENT_UP } |
enum | FileType { FILETYPE_AGX , FILETYPE_AAGX , FILETYPE_POV } |
Specify the type of file. More... | |
enum | MouseButton { MOUSE_LEFT , MOUSE_RIGHT , MOUSE_MIDDLE , MOUSE_WHEELUP , MOUSE_WHEELDOWN } |
Functions | |
template<> | |
bool AGXCORE_EXPORT | ArgumentParser::assignStringContent< agx::String > (const std::string &key, agx::String &type) |
template<> | |
bool AGXCORE_EXPORT | ArgumentParser::assignStringContent< std::string > (const std::string &key, std::string &type) |
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 . | |
float | cubicValueFunction (float val) |
AGXPHYSICS_EXPORT bool | decompressArchive (const agx::String &archiveFile, const agx::String &directory) |
Function which will de-compress an archive to a target directory. | |
AGXCORE_EXPORT bool | getRegisterValue (const char *key, agx::String &value) |
Get a string value from the registry written by the Installer. | |
float | linearValueFunction (float val) |
AGXCORE_EXPORT bool | packZipFile (const agx::String &zipFilePath, const agx::StringVector &fileList, agx::UInt compression=6) |
float | quadraticValueFunction (float val) |
AGXCORE_EXPORT char * | readBinaryFile (size_t *size, const agx::String &filePath) |
Read the content of a file into a char array allocated by the function. | |
void AGXCORE_EXPORT | readFile (agx::String &result, const agx::String &filePath) |
AGXPHYSICS_EXPORT bool | readFile (const agx::String &filename, agxSDK::Simulation *simulation, agxSDK::Assembly *parent=nullptr, agx::UInt selection=agxSDK::Simulation::READ_DEFAULT) |
Utility function for reading various files: | |
float | readFourChannelMergedValue01 (agxIO::Image *image, size_t x, size_t y) |
float | readOneOrTwoChannelValue01 (agxIO::Image *image, size_t x, size_t y) |
float | readSingleChannelValue01 (agxIO::Image *image, size_t x, size_t y, size_t channel) |
float | readThreeChannelMergedValue01 (agxIO::Image *image, size_t x, size_t y) |
void AGXCORE_EXPORT | registerKeyboardCallback (int key, InputEvent::CallbackType *callback) |
void AGXCORE_EXPORT | registerMouseCallback (MouseEvent::CallbackType *callback) |
void AGXCORE_EXPORT | triggerKeyboardEvent (int key, EventType type) |
void AGXCORE_EXPORT | triggerMouseEvent (MouseButton button, EventType type, const agx::Vec2 &pos) |
AGXCORE_EXPORT bool | unpackZipFile (const agx::String &zipFilePath, const agx::String &targetDirectoryPath) |
void AGXCORE_EXPORT | unregisterMouseCallback (MouseEvent::CallbackType *callback) |
AGXPHYSICS_EXPORT bool | writeFile (const agx::String &filename, 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 into various files: | |
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 | writeSingleChannelValue01 (unsigned char val, agxIO::Image *image, size_t x, size_t y, size_t channel) |
The agxIO namespace contains classes for reading, writing and finding files.
Definition at line 300 of file ArgumentParser.h.
typedef float(* agxIO::GetValueFunction) (float val) |
Definition at line 25 of file ImageValueInterpreter.h.
typedef agx::observer_ptr< const Image > agxIO::ImageConstObserver |
typedef agx::ref_ptr< const Image > agxIO::ImageConstRef |
typedef agx::observer_ptr< Image > agxIO::ImageObserver |
Definition at line 47 of file ImageReaderPNG.h.
typedef agx::ref_ptr<ImageReader> agxIO::ImageReaderRef |
Definition at line 41 of file ImageReader.h.
typedef agx::ref_ptr< Image > agxIO::ImageRef |
typedef agx::Event2<int, EventType> agxIO::InputEvent |
typedef agx::observer_ptr< const KeyEvent > agxIO::KeyEventConstObserver |
Definition at line 27 of file KeyEvent.h.
typedef agx::ref_ptr< const KeyEvent > agxIO::KeyEventConstRef |
Definition at line 27 of file KeyEvent.h.
typedef agx::observer_ptr< KeyEvent > agxIO::KeyEventObserver |
Definition at line 27 of file KeyEvent.h.
typedef agx::ref_ptr< KeyEvent > agxIO::KeyEventRef |
Definition at line 27 of file KeyEvent.h.
typedef agx::observer_ptr< const MeshReader > agxIO::MeshReaderConstObserver |
Definition at line 77 of file MeshReader.h.
typedef agx::ref_ptr< const MeshReader > agxIO::MeshReaderConstRef |
Definition at line 77 of file MeshReader.h.
Definition at line 66 of file MeshReaderOBJ.h.
typedef agx::observer_ptr< MeshReader > agxIO::MeshReaderObserver |
Definition at line 77 of file MeshReader.h.
typedef agx::ref_ptr< MeshReader > agxIO::MeshReaderRef |
Definition at line 77 of file MeshReader.h.
typedef agx::Event3<MouseButton, EventType, agx::Vec2> agxIO::MouseEvent |
Definition at line 252 of file ImageValueInterpreter.h.
typedef float(* agxIO::ReadValue01Function) (agxIO::Image *image, size_t x, size_t y) |
Definition at line 26 of file ImageValueInterpreter.h.
typedef agx::observer_ptr< const ResourceManager > agxIO::ResourceManagerConstObserver |
Definition at line 27 of file ResourceManager.h.
typedef agx::ref_ptr< const ResourceManager > agxIO::ResourceManagerConstRef |
Definition at line 27 of file ResourceManager.h.
Definition at line 27 of file ResourceManager.h.
typedef agx::ref_ptr< ResourceManager > agxIO::ResourceManagerRef |
Definition at line 27 of file ResourceManager.h.
enum agxIO::EventType |
enum agxIO::FileType |
Specify the type of file.
Enumerator | |
---|---|
FILETYPE_AGX | |
FILETYPE_AAGX | |
FILETYPE_POV |
Definition at line 55 of file agxIO/ReaderWriter.h.
enum agxIO::MouseButton |
bool AGXCORE_EXPORT agxIO::ArgumentParser::assignStringContent< agx::String > | ( | const std::string & | key, |
agx::String & | type | ||
) |
bool AGXCORE_EXPORT agxIO::ArgumentParser::assignStringContent< std::string > | ( | const std::string & | key, |
std::string & | type | ||
) |
AGXPHYSICS_EXPORT bool agxIO::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
.
Valid file extensions are:
archiveName | - Name of created archive |
files | - List of file to be compressed into archive |
|
inline |
Definition at line 38 of file ImageValueInterpreter.h.
AGXPHYSICS_EXPORT bool agxIO::decompressArchive | ( | const agx::String & | archiveFile, |
const agx::String & | directory | ||
) |
Function which will de-compress an archive to a target directory.
archiveFile | - Name of zipped archive |
directory | - Path to where files are unzipped. |
AGXCORE_EXPORT bool agxIO::getRegisterValue | ( | const char * | key, |
agx::String & | value | ||
) |
Get a string value from the registry written by the Installer.
key | - Name of the key |
value | - At success, the value will contain the string content of the key. |
|
inline |
Definition at line 28 of file ImageValueInterpreter.h.
AGXCORE_EXPORT bool agxIO::packZipFile | ( | const agx::String & | zipFilePath, |
const agx::StringVector & | fileList, | ||
agx::UInt | compression = 6 |
||
) |
|
inline |
Definition at line 33 of file ImageValueInterpreter.h.
AGXCORE_EXPORT char * agxIO::readBinaryFile | ( | size_t * | size, |
const agx::String & | filePath | ||
) |
Read the content of a file into a char array allocated by the function.
Ownership of the array is passed to the caller, who then becomes responsible for calling 'delete []' on it.
void AGXCORE_EXPORT agxIO::readFile | ( | agx::String & | result, |
const agx::String & | filePath | ||
) |
AGXPHYSICS_EXPORT bool agxIO::readFile | ( | const agx::String & | filename, |
agxSDK::Simulation * | simulation, | ||
agxSDK::Assembly * | parent = nullptr , |
||
agx::UInt | selection = agxSDK::Simulation::READ_DEFAULT |
||
) |
Utility function for reading various files:
The file will be searched for using AGX_ENVIRONMENT().getFilePath(agxIO::Environment::RESOURCE_PATH).find() which means that it will use the AGX_FILE_PATH environment variable and path's added to the RESOURCE_PATH.
The data will be added to the simulation given as an argument
filename | - Filename to be opened and read |
simulation | - The simulation where the content of the data will be added |
parent | - If specified (!= nullptr) all objects will be added to this parent |
selection | - Selection of things to read from file. See agxSDK::Simulation::ReadSelectionMask. Only for .agx or .aagx. |
|
inline |
Definition at line 58 of file ImageValueInterpreter.h.
References agxIO::Image::getData(), and agxIO::Image::getWidth().
|
inline |
Definition at line 43 of file ImageValueInterpreter.h.
References agxIO::Image::getChannels(), agxIO::Image::getData(), and agxIO::Image::getWidth().
|
inline |
Definition at line 66 of file ImageValueInterpreter.h.
References agxIO::Image::getChannels(), agxIO::Image::getData(), and agxIO::Image::getWidth().
|
inline |
Definition at line 50 of file ImageValueInterpreter.h.
References agxIO::Image::getData(), and agxIO::Image::getWidth().
void AGXCORE_EXPORT agxIO::registerKeyboardCallback | ( | int | key, |
InputEvent::CallbackType * | callback | ||
) |
void AGXCORE_EXPORT agxIO::registerMouseCallback | ( | MouseEvent::CallbackType * | callback | ) |
void AGXCORE_EXPORT agxIO::triggerKeyboardEvent | ( | int | key, |
EventType | type | ||
) |
void AGXCORE_EXPORT agxIO::triggerMouseEvent | ( | MouseButton | button, |
EventType | type, | ||
const agx::Vec2 & | pos | ||
) |
AGXCORE_EXPORT bool agxIO::unpackZipFile | ( | const agx::String & | zipFilePath, |
const agx::String & | targetDirectoryPath | ||
) |
void AGXCORE_EXPORT agxIO::unregisterMouseCallback | ( | MouseEvent::CallbackType * | callback | ) |
AGXPHYSICS_EXPORT bool agxIO::writeFile | ( | const agx::String & | filename, |
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 into various files:
filename | - Filename that will contain the simulation |
simulation | - The simulation containing the objects to be written to file |
from | - Camera position (only for .pov format) |
at | - Camera looking at point (only for .pov format) |
up | - Camera up direction (only for .pov format) |
fovy | - Field of view (only for .pov format) |
aspectRatio | ratio for the window size (only for .pov format) |
AGXPHYSICS_EXPORT bool agxIO::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.
type | - Specifies in what format, the simulation will be written to the stream |
outStream | - Stream that will contain the simulation |
simulation | - The simulation containing the objects to be written to file |
from | - Camera position (only for .pov format) |
at | - Camera looking at point (only for .pov format) |
up | - Camera up direction (only for .pov format) |
fovy | - Field of view (only for .pov format) |
aspectRatio | ratio for the window size (only for .pov format) |
|
inline |
Definition at line 74 of file ImageValueInterpreter.h.
References agxIO::Image::getChannels(), agxIO::Image::getData(), and agxIO::Image::getWidth().