Wavefront OBJ reader/writer
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mark Raynsford 0640e9c3f8
Some checks are pending
main-RHEL10-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL10-x86_64-jdk26 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk26 / Build (push) Waiting to run
Update workflows.
2026-07-31 18:42:55 +01:00
.forgejo Update workflows. 2026-07-31 18:42:55 +01:00
com.io7m.jobj.core Update to latest checkstyle and spotbugs. 2025-04-26 20:10:45 +00:00
com.io7m.jobj.tests Begin next development iteration. 2024-05-11 17:22:16 +00:00
com.io7m.jobj.tools Begin next development iteration. 2024-05-11 17:22:16 +00:00
src/site/resources Update site metadata. 2025-08-09 15:06:04 +00:00
.gitignore Update .gitignore. 2024-05-07 16:01:43 +00:00
.gitmodules Move to new organization. 2024-04-30 19:48:34 +00:00
doc7m-books.json Add doc7m-books.json 2026-07-31 18:36:46 +01:00
pom.xml Migrate project. 2026-06-27 10:10:25 +01:00
README-CHANGES.xml Mark release 1.0.0 2024-05-11 17:22:01 +00:00
README-LICENSE.txt Update LICENSE 2023-08-13 21:07:24 +00:00
README.in Migrate project. 2026-06-27 10:10:25 +01:00
README.md Migrate project. 2026-06-27 10:10:25 +01:00

jobj

Maven Central Maven Central (snapshot) Java Version

com.io7m.jobj

jobj

A parser for the useful subset of the Wavefront OBJ file format.

Features

  • Hand-written event-based recovering parser: Efficiently parse, accumulating errors along the way, without being tied to any particular AST types.
  • High coverage test suite.
  • OSGi-ready
  • JPMS-ready
  • ISC license.

Usage

Provide an implementation of the JOParserEventListenerType interface to a JOParserType:

Path file;
JOParserEventListenerType listener;
InputStream stream;

final JOParserType p =
  JOParser.newParserFromStream(
    Optional.of(file),
    stream,
    listener
  );

p.run();

The listener will receive parse events encountered during parsing of the file.

Coverage

The only specification for the OBJ file format is an unofficial specification that appears to have been handed around for decades.

Most of the OBJ file format has no relevance to anything used in modern computer graphics in 2024, but the format itself is often used as a bare-minimum portable text format for distributing mesh data. This parser attempts to capture the useful subset of data and makes no attempt to parse the entirety of the OBJ format. It's practically guaranteed that the parser will be missing the once piece of data you actually wanted to extract from the .obj file you're parsing. Patches to increase format coverage are welcome.