Module obj

Module obj 

Source
Expand description

OBJ format support with MTL material linking

This module provides comprehensive OBJ (Wavefront OBJ) reading and writing capabilities including:

  • Vertices (v), texture coordinates (vt), normals (vn), faces (f)
  • Groups/materials (usemtl, mtllib) with MTL file parsing
  • Polygon triangulation for faces with more than 3 vertices
  • Optional vertex-color support via conventions
  • Robust error handling and streaming read capabilities

Structs§

Face
Face definition
FaceVertex
Face vertex with indices for position, texture coordinate, and normal
Group
Group definition
Material
Material properties from MTL files
ObjData
Complete OBJ file data
ObjMeshStreamingReader
Streaming OBJ reader for mesh faces
ObjReader
OBJ reader (legacy interface)
ObjStreamingReader
Streaming OBJ reader for point clouds (vertices only)
ObjWriteOptions
OBJ writer options
ObjWriter
OBJ writer (legacy interface)
RobustObjReader
Enhanced OBJ reader with comprehensive format support
RobustObjWriter
Enhanced OBJ writer with comprehensive format support

Functions§

read_obj_vertices
Read an OBJ file and return vertex positions only (useful for point clouds)
write_obj_vertices
Write vertices as an OBJ file (useful for point clouds)