Skip to content

What do expressions look like?

Matt Larsen edited this page Jan 22, 2019 · 8 revisions

This is a scratch pad for the types of expressions we want to support.

Reduction expressions (triggers and filter parameters)

An expression that reduces to a single variable. Example types:

  • bool (integer)
  • integer
  • double
  • vec3

Example syntax:

  • bool: max("pressure") > 10.0
  • integer: 1 + 1
  • double: pow(1.0,0.5), magnitude(vec3(1.0, 2.0, 3.0) - coordinate(max("pressure")))
  • vec3: coordinate(max("pressure"))

Variable expressions (computing a new field on the mesh)

Clone this wiki locally