Main Content

vrimport

(To be removed) Import 3D file into virtual world or node

vrimport will be removed in a future release. For more information, see Version History.

Description

node = vrimport(source) creates an empty VRML virtual world and imports the source 3D file into it. The format of the 3D file is detected automatically. You can import these file formats:

  • FBX (Autodesk® FilmBoX format)

  • DAE (Collada digital asset exchange)

  • SDF (simulation description format)

  • STL (Stereolithography)

  • URDF (unified robot description file)

  • XML (Physical Modeling XML files)

The function returns a handle to the newly created node.

node = vrimport(parent,source) specifies the existing virtual world or node to import the 3D source file into.

node = vrimport(___,format) explicitly specifies the file format of the 3D source file (for example, 'urdf'). If the format of the source file does not match the format specified in the format argument, the function returns an error.

[node,virtualWorld] = vrimport(___) returns the handle of the new node and the handle of the virtual world that contains that node.

Input Arguments

collapse all

3D source file path, specified as a character vector. The 3D file can be in DAE, SDF, STL, or URDF format.

File format of source 3D file, specified as a character vector. Use this argument to specify explicitly the required format for the source 3D file.

Virtual world or node to import 3D source file into, specified as a virtual world handle or node handle.

  • If the parent is a virtual world, the imported node is placed at the ROOT node of the parent.

  • If the parent is a node in a virtual world, the imported node is placed in the children field of the node.

Output Arguments

collapse all

New node, returned as a vrnode object.

Virtual world containing new node, returned as a vrworld object.

Version History

Introduced in R2016b

collapse all