WoWs Model Exported
World of Warships 3D model Exporter
Loading...
Searching...
No Matches
Path and file utilities

Functions

std::string wows_stitch_path_basename (const std::string &p)
 Return the basename component of a path (everything after the last /).
 
std::string wows_stitch_path_dirname (const std::string &p)
 Return the directory component of a path (everything up to and including the last /).
 
std::string wows_stitch_stem (const std::string &filename)
 Return the stem of a filename (basename without the final extension).
 
std::string wows_stitch_normalize_slashes (std::string s)
 Replace all backslashes in s with forward slashes and return the result.
 
bool wows_stitch_file_exists (const std::string &p)
 Return true if the file at p exists and is readable.
 
std::string wows_stitch_model_to_geom_path (const std::string &model, const std::string &game_dir)
 Resolve a .visual model path to the corresponding .geometry file path.
 
std::string wows_stitch_geom_to_visual_suffix (const std::string &geom_path)
 Convert a .geometry filesystem path to its .visual suffix form.
 
std::vector< std::string > wows_stitch_find_hull_geoms (const std::string &hull_model, const std::string &game_dir)
 Find all .geometry files belonging to a hull model.
 
std::vector< std::string > wows_stitch_find_propeller_geoms (const std::string &hull_model, const std::string &game_dir)
 Find propeller/screw .geometry files for a ship.
 
std::string wows_stitch_find_game_file (const std::string &game_dir, const std::string &filename)
 Search for a game asset file by name under game_dir.
 

Detailed Description

Function Documentation

◆ wows_stitch_file_exists()

bool wows_stitch_file_exists ( const std::string &  p)

Return true if the file at p exists and is readable.

◆ wows_stitch_find_game_file()

std::string wows_stitch_find_game_file ( const std::string &  game_dir,
const std::string &  filename 
)

Search for a game asset file by name under game_dir.

Parameters
game_dirRoot resource directory.
filenameFilename (not a path) to search for.
Returns
Full filesystem path to the first match, or empty string if not found.

◆ wows_stitch_find_hull_geoms()

std::vector< std::string > wows_stitch_find_hull_geoms ( const std::string &  hull_model,
const std::string &  game_dir 
)

Find all .geometry files belonging to a hull model.

A single hull is often split into multiple part files (_Bow, _MidFront, etc.); this function enumerates them all.

Parameters
hull_modelPath to the hull .visual model.
game_dirRoot resource directory.
Returns
Sorted list of filesystem paths to the part .geometry files.

◆ wows_stitch_find_propeller_geoms()

std::vector< std::string > wows_stitch_find_propeller_geoms ( const std::string &  hull_model,
const std::string &  game_dir 
)

Find propeller/screw .geometry files for a ship.

Scans the same directory as the hull geometry for files whose names contain "prop" or "screw" (case-insensitive) and end in .geometry. These are the propeller meshes that the game animates at runtime.

Parameters
hull_modelPath to the hull .visual or .model file.
game_dirRoot resource directory.
Returns
Sorted list of filesystem paths to propeller .geometry files.

◆ wows_stitch_geom_to_visual_suffix()

std::string wows_stitch_geom_to_visual_suffix ( const std::string &  geom_path)

Convert a .geometry filesystem path to its .visual suffix form.

The suffix is suitable as the visual_suffix argument to wows_assets_bin_get_visual_info.

Parameters
geom_pathFilesystem path to a .geometry file.
Returns
Visual suffix string (e.g. "ShipDir/ShipDir.visual").

◆ wows_stitch_model_to_geom_path()

std::string wows_stitch_model_to_geom_path ( const std::string &  model,
const std::string &  game_dir 
)

Resolve a .visual model path to the corresponding .geometry file path.

Parameters
modelPath to the .visual model within the game tree.
game_dirRoot resource directory.
Returns
Filesystem path to the .geometry file, or empty string if not found.

◆ wows_stitch_normalize_slashes()

std::string wows_stitch_normalize_slashes ( std::string  s)

Replace all backslashes in s with forward slashes and return the result.

◆ wows_stitch_path_basename()

std::string wows_stitch_path_basename ( const std::string &  p)

Return the basename component of a path (everything after the last /).

◆ wows_stitch_path_dirname()

std::string wows_stitch_path_dirname ( const std::string &  p)

Return the directory component of a path (everything up to and including the last /).

◆ wows_stitch_stem()

std::string wows_stitch_stem ( const std::string &  filename)

Return the stem of a filename (basename without the final extension).