Fast Reader for 'Wavefront' OBJ 3D Scene Files

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.


Travis-CI Build Status CRAN_Status_Badge

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 devtools package to install the development version:

if (!require("devtools")) install.packages("devtools")
devtools::install_github("jefferis/readobj")

Note: MacOS X users will need a development environment (Xcode) to compile code. Windows users need Rtools to install this way.

Acknwoledgements

This package wraps the tinyobjloader C++ library available at https://github.com/syoyo/tinyobjloader. Kudos to its author, Syoyo Fujita!

tinyobjloader is released under a liberal 2 clause BSD license, which this package therefore inherits.

News

readobj 0.3.2

  • fixes a test error introduced by a change in object structure for latest version of rgl (thanks to Duncan Murdoch for the fix, #3)

readobj 0.3.1

  • Rename .obj sample files to .wavefront at request of CRAN maintainers to avoid false positive object file R CMD check NOTE.

readobj 0.3

  • fix bug in .Call since RCpp update
  • documentation improvements
  • URL fixes preparing for CRAN

readobj 0.2

  • fix bug in reading of normals (#1)
  • expand paths before reading (#2)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("readobj")

0.3.2 by Gregory Jefferis, 4 months ago


https://github.com/jefferis/readobj


Report a bug at https://github.com/jefferis/readobj/issues


Browse source code at https://github.com/cran/readobj


Authors: Gregory Jefferis [aut, cph, cre] , Syoyo Fujita [aut, cph] (tiny_obj_loader.* are copyright Syoyo Fujita)


Documentation:   PDF Manual  


BSD_2_clause + file LICENSE license


Imports Rcpp, grDevices

Suggests testthat, rgl

Linking to Rcpp


See at CRAN