|
WoWs Model Exported
World of Warships 3D model Exporter
|
Functions | |
| int | wows_parse_geometry (char *input, wows_geometry **geometry_content) |
Parse a .geometry file from a memory-mapped path. | |
| int | wows_parse_geometry_fp (FILE *input, wows_geometry **geometry_content) |
Parse a .geometry file from an already-open FILE stream. | |
| int | wows_geometry_print (wows_geometry *geometry_content, bool verbose) |
| Print a human-readable summary of a parsed geometry to stdout. | |
| int | wows_geometry_free (wows_geometry *geometry_content) |
| Free all memory associated with a parsed geometry. | |
| int | wows_geometry_to_glb (wows_geometry *geometry, const char *output_path) |
| Export a full geometry as a binary glTF (GLB) file. | |
| int | wows_geometry_to_glb_sections (wows_geometry *geometry, const char *output_path, const uint32_t *sections, uint32_t n_sections) |
| Export a subset of draw-call sections as a GLB file. | |
| int | wows_parse_geometry_buffer (char *contents, size_t length, wows_geometry **geometry_content) |
Parse a .geometry file from a raw memory buffer. | |
| int wows_geometry_free | ( | wows_geometry * | geometry_content | ) |
Free all memory associated with a parsed geometry.
Releases all buffers allocated during wows_parse_geometry or wows_parse_geometry_fp and sets the pointer to NULL conceptually.
| geometry_content | Geometry to free. |
| int wows_geometry_print | ( | wows_geometry * | geometry_content, |
| bool | verbose | ||
| ) |
Print a human-readable summary of a parsed geometry to stdout.
| geometry_content | Geometry to inspect. |
| verbose | If true, print per-vertex data in addition to header fields. |
| int wows_geometry_to_glb | ( | wows_geometry * | geometry, |
| const char * | output_path | ||
| ) |
Export a full geometry as a binary glTF (GLB) file.
All vertex and index sections are merged into a single GLB scene.
| geometry | Parsed geometry to export. |
| output_path | Destination path for the .glb file. |
| int wows_geometry_to_glb_sections | ( | wows_geometry * | geometry, |
| const char * | output_path, | ||
| const uint32_t * | sections, | ||
| uint32_t | n_sections | ||
| ) |
Export a subset of draw-call sections as a GLB file.
Only the draw calls whose mapping_id appears in sections are written. Useful for isolating a specific LOD level or ship part.
| geometry | Parsed geometry to export. |
| output_path | Destination path for the .glb file. |
| sections | Array of mapping_id values to include. |
| n_sections | Length of the sections array. |
| int wows_parse_geometry | ( | char * | input, |
| wows_geometry ** | geometry_content | ||
| ) |
Parse a .geometry file from a memory-mapped path.
Opens, maps, and fully decodes the file at input. On success *geometry_content points to a heap-allocated wows_geometry that must be freed with wows_geometry_free.
| input | Path to the .geometry file. |
| geometry_content | Output pointer; set to the parsed geometry on success. |
| int wows_parse_geometry_buffer | ( | char * | contents, |
| size_t | length, | ||
| wows_geometry ** | geometry_content | ||
| ) |
Parse a .geometry file from a raw memory buffer.
| contents | Pointer to the raw geometry file data. |
| length | Length of the buffer in bytes. |
| geometry_content | Output pointer; set to the parsed geometry on success. |
| int wows_parse_geometry_fp | ( | FILE * | input, |
| wows_geometry ** | geometry_content | ||
| ) |
Parse a .geometry file from an already-open FILE stream.
Reads from the current position of input to EOF. Ownership of the FILE handle is not transferred; the caller must close it.
| input | Open readable FILE stream positioned at the start of the data. |
| geometry_content | Output pointer; set to the parsed geometry on success. |