objToJSON | R Documentation |
Converts a mesh file in the OBJ format into the JSON format
objToJSON(obj, file = NULL)
obj |
A filepath to a file of type '.obj' or an 'obj' object, the value returned by the function readOBJ. |
file |
A filepath to a file of type '.json' where the converted obj object will be saved. If is |
This function convert a Wavefront .obj file or OBJ object into a JSON (JavaScript Object Notation) object and optionally saves this JSON object as a .json file. This function was written in order directly convert CT scan meshes exported from Horos into the JSON format for web visualization, eliminating intermediate conversions in programs such as meshlab and Blender. See readOBJ for more details and limitations in .obj file reading.
A JSON object, if file is NULL
Aaron Olsen
readOBJ
## Not run:
# Convert OBJ to JSON file
objToJSON(obj='obj_file.obj', file='json_file.json')
# Convert OBJ to JSON list object
json_list <- objToJSON(obj='obj_file.obj')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.