Main Content

optimize

(To be removed) Change geometries to reduce number of vertices

Since R2021a

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

    Description

    optimize(world,ratio) reduces the number of faces in all IndexedFaceSet nodes of world while trying to preserve the overall shape of these nodes.

    optimize(node,ratio) reduces the number of faces in the geometry of node while trying to preserve the overall shape of the node. If node is a grouping node, the function optimizes all IndexedFaceSet children of that node.

    Input Arguments

    collapse all

    Virtual World, specified as a vrworld object.

    Virtual Node, specified as a vrnode object.

    Fraction of intended number of faces relative to the original number of faces, specified as a real number. If ratio is less than 1, then it is interpreted as a fraction of the resulting number of faces relative to the original number of faces. If ratio is equal to 1, number of faces is unchanged and only shared vertices are merged (gluing faces).

    Version History

    Introduced in R2021a

    collapse all

    R2023b: To be removed

    The optimize will be removed in a future release. Instead, use sim3d classes and Simulation 3D blocks to interface MATLAB® and Simulink® with the Unreal Engine® 3D simulation environment. To get started, see Create 3D Simulations in Unreal Engine Environment.