▼V Reference
52 Find a task or a name
53 Modules to require
54 Scenes and sampling
55 Scene states
56 Animation requests
57 Native model details
58 Visuals
59 Geometry
60 Number Lines and Coordinate Decorations
61 Point Markers, Scatter Plots, and Filled Areas
62 Probability and Statistical Diagrams
63 Calculus lessons
64 Colors
65 Slides
66 Slide command-line tools
67 Source Programs and Authored Timelines
68 Interactive Preview and Inspection
69 Preview controls and diagnostics
70 Projects and Final Rendering
71 Project execution and cache details
72 Pict Renderer Protocol
73 3D reference map
74 3D:   Objects, groups, and paths
75 3D:   Cameras and projection
76 3D:   Views inside a Scene
77 3D:   Animating 3D objects
78 3D:   Animating the 3D camera
79 3D:   Cuts, caps, and section measurements
80 3D:   Supplementary surface, section, and annotation bindings
81 3D:   Cuts, sections, and numerical volume
82 3D:   Vectors
83 3D:   Linear maps and rotations
84 3D:   Affine transforms
85 3D:   Bounds, rays, and planes
86 3D:   Spatial maps and homotopies
87 3D:   Materials and lights
88 3D:   Lighting inspection
89 3D:   Shadow descriptors and stable bounds
90 3D:   Finite-light animation
91 3D:   Software finite-light evaluation
92 3D:   Colour space and final output
93 3D:   Relations and geometric annotations
94 3D:   Projected labels
95 3D:   Textured billboards
96 3D:   Spatial curves and vector diagrams
97 3D:   Spatial anchors and label layout
98 3D:   Anchors and projected labels
99 3D:   Parametric surfaces and calculus
100 3D:   Adaptive, trimmed, and implicit surfaces
101 3D:   Constructive solids
102 3D:   Surface constructors and queries
103 3D:   Meshes
104 3D:   Triangle topology
105 3D:   Polygonal faces
106 3D:   Deterministic convex hulls
107 3D:   Polyhedral duals
108 3D:   Schlegel diagrams and polyhedral nets
109 3D:   Conservative mesh correspondence
110 3D:   Topology-safe mesh matching
111 3D:   Checking and repairing mesh orientation
112 3D:   Clipping, sections, and transparency
113 3D:   Prepared spatial ODE trajectories and vector fields
114 3D:   Seeds and streamline sets
115 3D:   Poincare sections and return maps
116 3D:   Equilibria and local linearization
117 3D:   Flow maps and volume change
118 3D:   Drawing and inspecting trajectories
119 3D:   Reading prepared trajectories
120 3D:   Drawing vector fields and particles
121 3D:   Trajectory display
122 3D:   Spatial inspection and exact picking
123 3D:   Retained renderer backends
124 3D:   Compiled geometry and instances
125 3D:   Frame requests and results
126 3D:   Software rendering and statistics
127 3D:   Optional Racket/  Open  GL backend
128 Experimental Derived Visuals
129 Source Package Hygiene
On this page:
scene-state?
empty-scene-state
scene-state-count
scene-state-has?
scene-state-ref
scene-state-visuals-in-drawing-order
scene-state-resolved-ref
scene-state-resolved-visuals-in-drawing-order
scene-state-value-has?
scene-state-value-ref
9.3

55 Scene states🔗ℹ

Scene-state values are immutable. Their raw constructor and fields are not part of the public API.

procedure

(scene-state? value) → boolean?

  value : any/c
Returns #t when value is a scene-state value.

An empty scene state with no top-level Visuals, no named semantic values, and an empty drawing order.

procedure

(scene-state-count state) → exact-nonnegative-integer?

  state : scene-state?
Returns the number of top-level Visuals in state. A group counts as one top-level Visual regardless of the number of descendants it contains. A derived definition likewise counts as one top-level Visual.

procedure

(scene-state-has? state target) → boolean?

  state : scene-state?
  target : (or/c visual? symbol? visual-path?)
Returns #t when state contains the addressed Visual. A Visual argument is resolved through visual-id; a visual-path? follows built-in group children. Frame-space Visuals are not valid camera-follow targets.

procedure

(scene-state-ref state target) → visual?

  state : scene-state?
  target : (or/c visual? symbol? visual-path?)
Returns the stored Visual identified by target. A nested path returns its locally stored child, without inheriting parent transforms. Raises an exception when the identity is not present. For a derived Visual this returns the persistent derived-visual? definition rather than evaluating its resolver; use scene-state-resolved-ref when concrete geometry is required.

procedure

(scene-state-visuals-in-drawing-order state) → (listof visual?)

  state : scene-state?
Returns the stored top-level Visuals in back-to-front drawing order. The first Visual is painted first. The last Visual is painted on top. A group’s separate child order is available through group-visual-children. Derived entries remain persistent derived-visual? definitions in this raw list; use scene-state-resolved-visuals-in-drawing-order for concrete rendering values.

procedure

(scene-state-resolved-ref state target) → visual?

  state : scene-state?
  target : (or/c visual? symbol? visual-path?)
Returns the concrete addressed Visual for target in state. Ordinary Visuals are returned unchanged. A derived-visual? is evaluated against a read-only context built from this exact immutable state. The resolver may recursively request other top-level Visuals. Dependency cycles are rejected, and each result is validated for concrete-Visual type and identity preservation.

Returns concrete top-level Visuals in significant back-to-front order, resolving every derived definition against state. All entries share one local dependency-resolution traversal, so shared dependencies resolve consistently even when the dependent appears before its dependency in drawing order. The Pict scene adapter uses this operation without mutating stored state.

procedure

(scene-state-value-has? state id) → boolean?

  state : scene-state?
  id : (or/c symbol? scene-parameter?)
Returns #t when state contains the named semantic value identified by id. Named values are semantic state and are not rendered. Value and Visual identifiers share one global scene namespace.

procedure

(scene-state-value-ref state id) → any/c

  state : scene-state?
  id : (or/c symbol? scene-parameter?)
Returns the named interpolable semantic value identified by id. Raises an exception when the value is absent.