SFCGAL 2.0.0
SFCGAL::io::VTK Namespace Reference

Functions

void save (const Geometry &geom, std::ostream &out)
 Saves a geometry to a legacy VTK format stream.
void save (const Geometry &geom, const std::string &filename)
 Saves a geometry to a legacy VTK file.
auto saveToString (const Geometry &geom)
 Saves a geometry to a legacy VTK format string.
void saveToBuffer (const Geometry &geom, char *buffer, size_t *size)
 Saves a geometry to a legacy VTK format buffer (C API).

Function Documentation

◆ save() [1/2]

SFCGAL_API void SFCGAL::io::VTK::save ( const Geometry & geom,
const std::string & filename )

Saves a geometry to a legacy VTK file.

Parameters
[in]geomThe geometry to save
[in]filenameThe name of the file to save to
Exceptions
std::runtime_errorIf the file cannot be opened or the geometry is invalid

◆ save() [2/2]

SFCGAL_API void SFCGAL::io::VTK::save ( const Geometry & geom,
std::ostream & out )

Saves a geometry to a legacy VTK format stream.

Parameters
[in]geomThe geometry to save
[out]outThe output stream
Exceptions
std::runtime_errorIf the geometry is invalid or unsupported

◆ saveToBuffer()

SFCGAL_API void SFCGAL::io::VTK::saveToBuffer ( const Geometry & geom,
char * buffer,
size_t * size )

Saves a geometry to a legacy VTK format buffer (C API).

Parameters
[in]geomThe geometry to save
[out]bufferThe buffer to write to
[in,out]sizeOn input, the size of the buffer. On output, the number of bytes written (or required if buffer is null)
Exceptions
std::runtime_errorIf the geometry is invalid or unsupported

◆ saveToString()

SFCGAL_API std::string SFCGAL::io::VTK::saveToString ( const Geometry & geom)

Saves a geometry to a legacy VTK format string.

Parameters
[in]geomThe geometry to save
Returns
The legacy VTK format string
Exceptions
std::runtime_errorIf the geometry is invalid or unsupported