|
Lagrange
|
Options for deserialization (load/deserialize functions). More...
#include <lagrange/serialization/types.h>
Public Attributes | |
| bool | allow_scene_conversion = false |
| Allow converting between meshes and scenes during deserialization. | |
| bool | allow_type_cast = false |
| Allow casting scalar and index types during deserialization. | |
| bool | quiet = false |
| Suppress warnings during deserialization. | |
Options for deserialization (load/deserialize functions).
| bool allow_scene_conversion = false |
Allow converting between meshes and scenes during deserialization.
When enabled, deserializing a buffer that contains a different type than requested will attempt automatic conversion. For example, calling deserialize_mesh() on a buffer containing a Scene will convert the scene to a single mesh using scene_to_mesh().
When disabled (the default), a type mismatch will throw an exception.
| bool allow_type_cast = false |
Allow casting scalar and index types during deserialization.
When enabled, deserializing a buffer serialized with different Scalar/Index types than the requested template parameters will cast the data accordingly. For example, deserializing a mesh saved as <float, uint32_t> into a SurfaceMesh<double, uint64_t>.
This applies to all contained meshes, including those inside Scene and SimpleScene objects. For SimpleScene, instance transforms are also cast to the target scalar type.
When disabled (the default), a scalar/index type mismatch will throw an exception.
| bool quiet = false |
Suppress warnings during deserialization.
When set to true, suppresses the warnings that are normally logged when scene conversion (via allow_scene_conversion) or type casting (via allow_type_cast) is performed.