Main Content

optimize

Change geometries to reduce number of vertices

Since R2021a

    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