WoWs Model Exported
World of Warships 3D model Exporter
Loading...
Searching...
No Matches
High-level export

Functions

bool wows_stitch_export_ship (const std::string &game_dir, const std::string &ship_name, const std::string &output_path, const wows_ship_export_options &opts={})
 Export a complete ship model to a binary glTF (GLB) file.
 
bool wows_stitch_export_ship_to_glb_mem (const std::string &game_dir, const std::string &ship_name, std::vector< uint8_t > &glb_out, const wows_ship_export_options &opts={}, wows_file_provider_t file_provider=nullptr)
 Export a complete ship model to a binary glTF (GLB) buffer in memory.
 

Typedefs

using wows_file_provider_t = std::function< std::vector< uint8_t >(const std::string &)>
 Callback type for reading a file from an arbitrary storage backend.
 

Detailed Description

Function Documentation

◆ wows_stitch_export_ship()

bool wows_stitch_export_ship ( const std::string &  game_dir,
const std::string &  ship_name,
const std::string &  output_path,
const wows_ship_export_options opts = {} 
)

Export a complete ship model to a binary glTF (GLB) file.

Locates all hull and turret geometry files, decodes vertices and indices, applies textures, and writes the result to output_path.

Python must not be initialised by the caller; this function manages Py_Initialize / Py_Finalize internally for GameParams.data access.

Parameters
game_dirPath to the game's root resource directory.
ship_nameShip identifier as it appears in GameParams.data (e.g. "PJSB009").
output_pathDestination path for the .glb output file.
optsExport options; defaults are applied if not specified.
Returns
true on success; errors are printed to stderr.

◆ wows_stitch_export_ship_to_glb_mem()

bool wows_stitch_export_ship_to_glb_mem ( const std::string &  game_dir,
const std::string &  ship_name,
std::vector< uint8_t > &  glb_out,
const wows_ship_export_options opts = {},
wows_file_provider_t  file_provider = nullptr 
)

Export a complete ship model to a binary glTF (GLB) buffer in memory.

Like wows_stitch_export_ship but writes the result to an in-memory buffer instead of a file. If file_provider is non-null, it is used to read geometry files instead of the filesystem (allowing archive-backed storage). GameParams.data and assets.bin may be supplied either as filesystem paths (including auto-detection under game_dir) or via opts.gameparams_data / opts.assets_bin_data when reading from archives or other non-file sources.

Parameters
game_dirPath to the game's root resource directory (used as base for paths when file_provider is null).
ship_nameShip identifier in GameParams.data.
glb_outOutput: filled with the GLB bytes on success.
optsExport options.
file_providerOptional: callback to read geometry files from memory.
Returns
true on success.

Typedef Documentation

◆ wows_file_provider_t

using wows_file_provider_t = std::function<std::vector<uint8_t>(const std::string &)>

Callback type for reading a file from an arbitrary storage backend.

Takes a virtual file path (relative to the game root) and returns the file bytes. Returns an empty vector on failure.