Expand description
Binarized ODOL v56 model reading.
Reading binarized ODOL models (version 56), the format of every .p3d in the DayZ game files.
Odol::read reads what a listing needs: the model-level properties, the skeleton, the animation
classes and, per LOD, the vertex and face counts, textures, materials, proxies, named selections and
properties. It doesn’t decode geometry. Every count and size in the file is checked against the bytes
left and against a limit before it is used, and a LOD that fails to parse is reported with its index and
file offset.
The reader seeks a lot and reads small values, so it reads the header part through its own buffer and the bytes
of each LOD into memory in one piece (at most 256 MiB per LOD), then parses them from there. Pass a
std::fs::File directly; a std::io::BufReader around it is not needed.
Structs§
- Odol
- A binarized model: the model-level facts and the LODs.
- Odol
Animation - An animation class of the model (a
model.cfganimation, baked into the model). - OdolLod
- A LOD of a binarized model.
- Odol
Material - A material of a LOD.