pub struct Parser { /* private fields */ }Expand description
Parser for MDX model files
The Parser reads binary MDX files and converts them into the Model structure. It supports multiple parsing modes and can handle version differences.
Uses the PImpl (Pointer to Implementation) idiom to hide implementation details.
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn parse_file(&mut self, file_path: &str) -> Option<Model>
pub fn parse_file(&mut self, file_path: &str) -> Option<Model>
Parse an MDX file from disk
The format is detected from the file extension: .mdl for text MDL format, .mdx (or any other extension) for binary MDX format.
@param filePath Path to the MDX/MDL file @return Parsed MDX file data @throws std::runtime_error If file cannot be opened or parsing fails in strict mode
Sourcepub fn parse(&mut self, buffer: &[u8], format: MDLXFormat) -> Option<Model>
pub fn parse(&mut self, buffer: &[u8], format: MDLXFormat) -> Option<Model>
Parse an MDX/MDL file from memory buffer @param buffer Memory buffer containing MDX/MDL data @param format Source format (MDX binary or MDL text) @return Parsed MDX file data @throws std::runtime_error If parsing fails in strict mode
Sourcepub fn has_issues(&self) -> bool
pub fn has_issues(&self) -> bool
Check if parsing encountered any issues @return True if there were warnings or recoverable errors