|
WoWs Model Exported
World of Warships 3D model Exporter
|
Public API for parsing and exporting World of Warships .geometry files.
More...
#include <stdint.h>#include <stdbool.h>Go to the source code of this file.
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. | |
Data Structures | |
| struct | wows_vertex |
| Minimal vertex containing only position, normal, and UV. More... | |
| struct | wows_vert_xyznuvtbpc |
| Vertex with tangent and binormal vectors (TB layouts). More... | |
| struct | wows_vert_xyznuvrpc |
| Vertex with an extra 32-bit R attribute (R layouts). More... | |
| struct | wows_geometry_header |
Top-level .geometry file header at offset 0. More... | |
| struct | wows_geometry_info |
| Draw-call descriptor mapping a render set to a slice of a merged buffer. More... | |
| struct | wows_geometry_vertex_section_metadata |
| Metadata for one merged vertex buffer (ENCD block descriptor). More... | |
| struct | wows_geometry_vertex_section |
| Decoded vertex buffer for one merged vertex stream. More... | |
| struct | wows_geometry_index_section_metadata |
| Metadata for one merged index buffer (ENCD block descriptor). More... | |
| struct | wows_geometry_index_section |
| Decoded index buffer for one merged index stream. More... | |
| struct | wows_geometry |
Top-level container for a fully parsed .geometry file. More... | |
| struct | WOWS_GEOMETRY_CONTEXT |
| Library context holding global parse settings. More... | |
Public API for parsing and exporting World of Warships .geometry files.
A .geometry file stores meshoptimizer-compressed (ENCD) vertex and index buffers for one or more parts of a ship model. This library decompresses those buffers and can export the result as a binary glTF (GLB) file.
Typical usage:
| #define WOWS_BLOC_INFO_SIZE 16 |
Size of a serialised wows_geometry_info entry in bytes.
| #define WOWS_HEADER_SIZE 72 |
Size of a serialised wows_geometry_header in bytes.
| #define WOWS_INDEX_META_SIZE 16 |
Size of a serialised wows_geometry_index_section_metadata in bytes.
| #define WOWS_VERTEX_FIELDS |
Common vertex fields shared by every vertex layout.
This macro expands to the position, packed normal, unpacked normal components, and texture coordinates that appear in every format variant. It is used as the first member block of every vertex struct. Texture coordinate V.
| #define WOWS_VERTEX_META_SIZE 32 |
Size of a serialised wows_geometry_vertex_section_metadata in bytes.