OBJ file format tools.
More...
|
| auto | parseObjData (std::istream &inOBJ) -> ObjData |
| | Parse OBJ data from input stream.
|
| auto | createGeometryFromObjData (const ObjData &obj_data) -> std::unique_ptr< Geometry > |
| | Create geometry from parsed OBJ data.
|
| void | save (const Geometry &geom, std::ostream &out) |
| | Saves a geometry to an OBJ format stream.
|
| void | save (const Geometry &geom, const std::string &filename) |
| | Saves a geometry to an OBJ file.
|
| auto | saveToString (const Geometry &geom) -> std::string |
| | Saves a geometry to an OBJ format string.
|
| void | saveToBuffer (const Geometry &geom, char *buffer, size_t *size) |
| | Saves a geometry to an OBJ format buffer (C API).
|
| auto | load (std::istream &inOBJ) -> std::unique_ptr< Geometry > |
| | Loads a geometry from an OBJ format stream.
|
| auto | load (const std::string &obj) -> std::unique_ptr< Geometry > |
| | Loads a geometry from an OBJ format string.
|
| auto | loadFromFile (const std::filesystem::path &filename) -> std::unique_ptr< Geometry > |
| | Loads a geometry from an OBJ file.
|
◆ createGeometryFromObjData()
| auto SFCGAL::io::OBJ::createGeometryFromObjData |
( |
const ObjData & | obj_data | ) |
-> std::unique_ptr< Geometry > |
Create geometry from parsed OBJ data.
- Parameters
-
| [in] | obj_data | Parsed OBJ data |
- Returns
- Geometry created from OBJ data
- Exceptions
-
◆ load() [1/2]
| SFCGAL_API auto SFCGAL::io::OBJ::load |
( |
const std::string & | obj | ) |
-> std::unique_ptr< Geometry > |
Loads a geometry from an OBJ format string.
- Parameters
-
| [in] | obj | The OBJ format string |
- Returns
- The loaded geometry
- Exceptions
-
◆ load() [2/2]
| SFCGAL_API auto SFCGAL::io::OBJ::load |
( |
std::istream & | inOBJ | ) |
-> std::unique_ptr< Geometry > |
Loads a geometry from an OBJ format stream.
- Parameters
-
| [inOBJ] | in The input stream |
- Returns
- The loaded geometry
- Exceptions
-
◆ loadFromFile()
| SFCGAL_API auto SFCGAL::io::OBJ::loadFromFile |
( |
const std::filesystem::path & | filename | ) |
-> std::unique_ptr< Geometry > |
Loads a geometry from an OBJ file.
- Parameters
-
| [in] | filename | The name of the file to load from |
- Returns
- The loaded geometry
- Exceptions
-
◆ parseObjData()
| auto SFCGAL::io::OBJ::parseObjData |
( |
std::istream & | inOBJ | ) |
-> ObjData |
Parse OBJ data from input stream.
- Parameters
-
| [in] | inOBJ | Input stream containing OBJ data |
- Returns
- Parsed OBJ data
- Exceptions
-
◆ save() [1/2]
| SFCGAL_API void SFCGAL::io::OBJ::save |
( |
const Geometry & | geom, |
|
|
const std::string & | filename ) |
Saves a geometry to an OBJ file.
- Parameters
-
| [in] | geom | The geometry to save |
| [in] | filename | The name of the file to save to |
- Exceptions
-
◆ save() [2/2]
| SFCGAL_API void SFCGAL::io::OBJ::save |
( |
const Geometry & | geom, |
|
|
std::ostream & | out ) |
Saves a geometry to an OBJ format stream.
- Parameters
-
| [in] | geom | The geometry to save |
| [out] | out | The output stream |
- Exceptions
-
◆ saveToBuffer()
| SFCGAL_API void SFCGAL::io::OBJ::saveToBuffer |
( |
const Geometry & | geom, |
|
|
char * | buffer, |
|
|
size_t * | size ) |
Saves a geometry to an OBJ format buffer (C API).
- Parameters
-
| [in] | geom | The geometry to save |
| [out] | buffer | The buffer to write to |
| [in,out] | size | On input, the size of the buffer. On output, the number of bytes written (or required if buffer is null) |
- Exceptions
-
◆ saveToString()
| SFCGAL_API auto SFCGAL::io::OBJ::saveToString |
( |
const Geometry & | geom | ) |
-> std::string |
Saves a geometry to an OBJ format string.
- Parameters
-
| [in] | geom | The geometry to save |
- Returns
- The OBJ format string
- Exceptions
-