Algosim documentation: VisualObject

VisualObject

Returns a structure containing data about a visual object.

Syntax

Description

If r is a reference to a visual object, then VisualObject(r) returns a VisualObject structure containing information about the object referenced by r.

Examples

t ≔ solid("teapot"); VisualObject(t)
ID: {2C0D364B-46B2-4429-9375-C271B63FA844}
name: Teapot
type: ObjModel
realm: ℝ³
title:
description:
ForEach(
  filter(VisualObjects(), (r ↦ VisualObject(r).type = "Sphere")),
  r,
  AdjustVisual(r, "color": "gold")
)

(Makes every sphere in every 3D scene in the current Algosim session golden.)

See also