Skip to main content

Module p3d

Module p3d 

Source
Expand description

P3D model reading and inspection. Reading, writing and inspecting P3D models.

crate::p3d::P3D handles the editable MLOD format and keeps everything the file holds, so that write(read(x)) reproduces x byte for byte. Binarized ODOL models are only recognised (format and version); they are produced by BI’s binarize.exe, not by this crate.

Structs§

Face
A face with its vertices, texture and material.
LOD
One level of detail of the model.
P3D
An MLOD model.
Point
A vertex position with its flags.
Tagg
One entry of a LOD’s TAGG section. The same name can occur several times (#Property#, #UVSet#), so these are kept in file order in a Vec.
Vertex
A face vertex: indices into the point and normal arrays plus a UV pair.

Functions§

lod_name
Human readable name of a LOD resolution, for the values that are well known.
model_magic
The 4 byte magic of a model file (“MLOD”, “ODOL” or “BMTR”), if it is one. The reader is put back to where it was.