Algosim documentation: VisualObjects

VisualObjects

Returns a list of references to every visual object in the current Algosim session.

Syntax

Description

VisualObjects() returns a list of references to every visual object in the current Algosim session.

Examples

Return the total number of spheres found in the current Algosim session. This counts the spheres in every 3D scene in memory:

count(VisualObjects(), (r ↦ VisualObject(r).type = "Sphere"))
8

Make every sphere in every 3D scene in the current Algosim session golden:

ForEach(
  filter(VisualObjects(), (r ↦ VisualObject(r).type = "Sphere")),
  r,
  AdjustVisual(r, "color": "gold")
)

See also