Defines properties of a single operation in a formula operation stack.
The following operator/operand pairings are supported:
Operator | Operand | Effect |
---|---|---|
push | url | Evaluates the given property and pushes the resulting value onto the stack. |
push | val | Pushes the given value onto the stack. May be one of int, float, float2, or float5 type. See Supported Value Types below. |
add | None | Adds the top two stack entries. Pops the top two entries off of the stack, adds them and pushes the result back on the stack. |
sub | None | Subtracts the top stack entry from the next-to-top entry. Pops two entries off of the stack and pushes the result of the subtraction. |
mult | None | Multiplies the top two stack entries. Pops the top two entries off of the stack, multiplies them and pushes the result back on the stack. |
div | None | Divides the next-to-top stack entry by the top entry. Pops two entries off of the stack and pushes the result of the division. |
inv | None | Inverses the top stack entry. Pops the top entry off the stack and pushes the inverse value (1/n) back onto the stack. |
neg | None | Negates the top stack entry. Pops the top entry off the stack and pushes the negated value (-n) back onto the stack. |
spline_linear | None | Linear interpolation between key values. Pops one entry off of the stack to use as the number of keys to process (N), pops N entries off of the stack to define the linear spline, pops one entry off of the stack to use as the value to evaluate on the spline and pushes the result back onto the stack. |
spline_constant | None | Constant interpolation between key values. Pops one entry off of the stack to use as the number of keys to process (N), pops N entries off of the stack to define the constant spline, pops one entry off of the stack to use as the value to evaluate on the spline and pushes the result back onto the stack. |
spline_tcb | None | TCB (Kochanek-Bartels) Spline interpolation between key values. Pops one entry off of the stack to use as the number of keys to process (N), pops N entries off of the stack to define the TCB spline, pops one entry off of the stack to use as the value to evaluate on the spline and pushes the result back onto the stack. |
The following value types are supported for the “push” (operator) “val” (operand) pairing above:
The following pairings describe the sequence of “push” operations that precede a given operator:
Operator | Sequence |
---|---|
add | A URI, int, or float to add. |
sub | A URI, int, or float to subtract. |
mult | A URI, int, or float to multiply by. |
div | A URI, int, or float to divide by. |
inv | A URI, int, or float to invert. |
neg | A URI, int, or float to negate. |
spline_linear | An int indicating the number of knot2 values that define the spline; N. N number of knot2 values that define the individual knots of the spline. A URI, int, or float to evaluate on the spline. |
spline_constant | An int indicating the number of knot2 values that define the spline; N. N number of knot2 values that define the individual knots of the spline. A URI, int, or float to evaluate on the spline. |
spline_tcb | An int indicating the number of knot5 values that define the spline; N. N number of knot5 values that define the individual knots of the spline. A URI, int, or float to evaluate on the spline. |
{ "op" : "push", "url" : "hips:#hips?rotation/x" }
{ "op" : "mult" }
{ "op" : "push", "val" : 1.8 }