Lagrange
SaveOptions Struct Reference

Options used when saving a mesh or a scene. More...

#include <lagrange/io/types.h>

Public Types

enum class  OutputAttributes { All , SelectedOnly }
 Which attributes to save with the mesh? More...
 
enum class  AttributeConversionPolicy { ExactMatchOnly , ConvertAsNeeded }
 While Lagrange SurfaceMesh supports vertex, facet, corner, edge and indexed attributes, many filetypes only support a subset of these attribute types. More...
 

Public Attributes

FileEncoding encoding = FileEncoding::Binary
 Whether to encode the file as plain text or binary. More...
 
OutputAttributes output_attributes = OutputAttributes::All
 
std::vector< AttributeIdselected_attributes
 Attributes to output, usage depends on the above.
 
AttributeConversionPolicy attribute_conversion_policy
 The attribute conversion policy to use. More...
 
bool embed_images = false
 Whether to embed images in the file (if supported by the filetype)
 
std::vector< scene::UserDataConverter * > extension_converters
 

Detailed Description

Options used when saving a mesh or a scene.

Note that not all options are supported for all backends or filetypes.

Member Enumeration Documentation

◆ OutputAttributes

enum class OutputAttributes
strong

Which attributes to save with the mesh?

Enumerator
All 

All attributes (default)

SelectedOnly 

Only attributes listed in selected_attributes

◆ AttributeConversionPolicy

enum class AttributeConversionPolicy
strong

While Lagrange SurfaceMesh supports vertex, facet, corner, edge and indexed attributes, many filetypes only support a subset of these attribute types.

The AttributeConversionPolicy provides the options to handle non-supported attributes when saving them.

Enumerator
ExactMatchOnly 

Ignore mismatched attributes and print a warning.

ConvertAsNeeded 

Convert attribute to supported attribute type when possible.

Member Data Documentation

◆ encoding

FileEncoding encoding = FileEncoding::Binary

Whether to encode the file as plain text or binary.

Some filetypes only support Ascii and will ignore this parameter.

◆ attribute_conversion_policy

AttributeConversionPolicy attribute_conversion_policy
Initial value:

The attribute conversion policy to use.


The documentation for this struct was generated from the following file: