Utility class for reading and writing TerrainMaterial objects to JSON format.
More...
#include <TerrainMaterialReaderWriter.h>
Utility class for reading and writing TerrainMaterial objects to JSON format.
The data can be written to both files and strings.
Definition at line 33 of file TerrainMaterialReaderWriter.h.
Read TerrainMateiral configuration from a file in JSON format into a TerrainMaterial object.
- Parameters
-
| filename | - the filename of the file containing the terrain material configuration in JSON format. |
| terrainMaterial | - the TerrainMaterial object that will be initialized with the data from the JSON file. |
- Returns
- true if the file was successfully read, false otherwise.
| static bool agxTerrain::TerrainMaterialReaderWriter::readJsonString |
( |
TerrainMaterial * |
terrainMaterial, |
|
|
const agx::String & |
jsonString |
|
) |
| |
|
static |
Read a TerrainMaterial configuration from a string in JSON format.
- Parameters
-
| jsonString | - the string where the JSON data will be read from. |
| terrainMaterial | - the TerrainMaterial object that will be written to from the JSON string. |
- Returns
- true if the data was successfully read to the JSON string, false otherwise.
| static bool agxTerrain::TerrainMaterialReaderWriter::writeJson |
( |
const TerrainMaterial * |
terrainMaterial, |
|
|
const agx::String & |
filename |
|
) |
| |
|
static |
Write a TerrainMaterial configuration to a file in JSON format.
- Parameters
-
| terrainMaterial | - the TerrainMaterial object that will be written to the JSON file. |
| filename | - the filename of the file where the the terrain material configuration will be written in JSON format. |
- Returns
- true if the file was successfully written, false otherwise.
| static bool agxTerrain::TerrainMaterialReaderWriter::writeJsonString |
( |
const TerrainMaterial * |
terrainMaterial, |
|
|
agx::String & |
jsonString |
|
) |
| |
|
static |
Write a TerrainMaterial configuration to a string in JSON format.
- Parameters
-
| terrainMaterial | - the TerrainMaterial object that will be written to the JSON string. |
| jsonString | - the string where the JSON data will be written. |
- Returns
- true if the data was successfully written to the JSON string, false otherwise.
The documentation for this class was generated from the following file: