Description
Fast Reader for 'Wavefront' OBJ 3D Scene Files.
Description
Wraps 'tiny_obj_loader' C++ library for reading the 'Wavefront' OBJ 3D file format including both mesh objects and materials files. The resultant R objects are either structured to match the 'tiny_obj_loader' internal data representation or in a form directly compatible with the 'rgl' package.
README.md
readobj
Quick Start
For the impatient ...
# install CRAN version
install.packages("readobj")
# use
library(readobj)
# run examples
example("read.obj")
# get overview help for package
?readobj
# help for functions
?read.obj
# run tests
library(testthat)
test_package("readobj")
Installation
A released version is now available on CRAN.
install.packages("readobj")
Development version
You can use the remotes package to install the development version:
if (!require("remotes")) install.packages("remotes")
remotes::install_github("jefferis/readobj")
Note: You will need a development environment able to compile code C++ to install in this way. MacOS X users will likely need Xcode (see https://cran.r-project.org/). Windows users need Rtools to install this way.
Acknowledgements
This package wraps the tinyobjloader C++ library available at https://github.com/tinyobjloader/tinyobjloader. Kudos to its author, Syoyo Fujita!
tinyobjloader is released under a liberal 2 clause BSD license, which this package therefore inherits.