# NOT RUN {
cube=read.obj(system.file("obj/cube.wavefront", package = "readobj"))
str(cube)
# elements will be NULL when not present in the obj file e.g. normals
is.null(cube$shapes[[1]]$texcoords)
# demonstrate direct conversion of result to rgl format
if(require('rgl')) {
cuber=read.obj(system.file("obj/cube.wavefront", package = "readobj"),
convert.rgl=TRUE)
shade3d(cuber)
}
# }
Run the code above in your browser using DataCamp Workspace