Learn R Programming

rayvertex (version 0.12.0)

write_scene_to_obj: Write the scene to an OBJ file

Description

Writes the current scene to a Wavefront OBJ file, with or without materials

Usage

write_scene_to_obj(scene, filename, materials = TRUE, fileext = ".obj")

Value

None

Arguments

scene

A rayvertex scene.

filename

The filename for the OBJ file.

materials

Default TRUE. Whether to write an MTL file to specify the materials for the OBJ.

fileext

Default ".obj". The file extension to add to the filename.

Examples

Run this code
if(run_documentation()) {
tmpfile = tempfile(fileext = ".obj")
write_scene_to_obj(generate_cornell_mesh(), tmpfile)
}

Run the code above in your browser using DataLab