| 40 | { |
| 41 | template < index_t dimension > |
| 42 | std::vector< std::string > LightRegularGridOutput< dimension >::write( |
| 43 | const LightRegularGrid< dimension >& grid ) const |
| 44 | { |
| 45 | std::ofstream file{ to_string( this->filename() ), |
| 46 | std::ofstream::binary }; |
| 47 | TContext context{}; |
| 48 | BitseryExtensions::register_serialize_pcontext( |
| 49 | std::get< 0 >( context ) ); |
| 50 | Serializer archive{ context, file }; |
| 51 | archive.object( grid ); |
| 52 | archive.adapter().flush(); |
| 53 | OpenGeodeMeshException::check_exception( |
| 54 | std::get< 1 >( context ).isValid(), nullptr, |
| 55 | OpenGeodeException::TYPE::internal, |
| 56 | "[Bitsery::write] Error while writing file: ", this->filename() ); |
| 57 | return { to_string( this->filename() ) }; |
| 58 | } |
| 59 | |
| 60 | template < index_t dimension > |
| 61 | std::vector< std::string > save_light_regular_grid( |