readobj: Read a Wavefront OBJ 3D scene file into a tri-mesh

Description Usage Arguments Value Examples

View source: R/readobj.R

Description

This function reads a OBJ file, which a file format that is commonly used in 3D graphics applications. It does not represent text, but does represent points, lines, polygons.

Usage

1
readobj(obj.file, mesh = TRUE)

Arguments

obj.file

Path to an OBJ file

mesh

boolean, construct tri-mesh? the default is TRUE

Value

a named list with items shapes and materials, each containing sublists with one entry per object (shapes) or material (materials). Objects in the shapes list have the following structure

Examples

1
2
3
4
5
data(refface)
ref.m <- refface$ref.m
obj.file <- tempfile(fileext = '.obj')
writeobj(obj.file, ref.m)
ref.m <- readobj(obj.file)

changebio/MAGPA documentation built on June 15, 2020, 9:26 p.m.