Main Content

findBy

Find all actors that match specified criteria

    Description

    actorList = findBy(actor,PropertyName,PropertyValue) finds within actor and its children, all actors that match PropertyName with specified PropertyValue.

    actorList = findBy(actor,PropertyName,PropertyValue,SearchMode) finds within actor and its children, all actors that match PropertyName with specified PropertyValue.

    Input Arguments

    collapse all

    Actor being searched, specified as a sim3d.Actor object.

    Name of property of sim3d.Actor object whose value is being matched, specified as a character array.

    Example: actors = findBy(Actor, 'Physics', true) finds all actors with activated physics

    Value of property being matched specified as the value of a sim3d.Actor object property.

    Example: a = findBy(Actor1, 'Color', [1 0 0])

    Method of actor tree search, specified as 'full', 'first', or .'last'.

    • 'full' – Search the entire tree branch.

    • 'first' – Search the first actor object.

    • 'last' – Search the last actor object.

    Output Arguments

    collapse all

    List of actors matching specified criteria, specified as an array of sim3d.Actor objects.

    Version History

    Introduced in R2022b