-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.in
50 lines (37 loc) · 1.44 KB
/
README.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
## 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](https://www.osgi.org/)
* [JPMS-ready](https://en.wikipedia.org/wiki/Java_Platform_Module_System)
* 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](src/site/resources/obj.txt) 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.