Parameter2D

2D variant of a parameter.

Constructors

this
this(string name)

Construct a new named parameter.

Members

Functions

findKeypointAndNormal
vec2i findKeypointAndNormal(vec2 pos, vec2 norm)

Find the keypoint index of the given position, as well as its normal.

lerp
vec2 lerp(vec2 norm)

Linearly interpolate min & max by the given value.

normalize
vec2 normalize(vec2 pos)

Normalize the given position memberwise between min & max.

onDeserialize
void onDeserialize(DataNode object, ModelState state)

Deserialize this parameter.

onFinalize
void onFinalize(Puppet puppet, ModelState state)

Finalizes the parameter.

onSerialize
void onSerialize(DataNode object)

Serialize this parameter.

pushValue
void pushValue(vec2 value)

Force this parameter to take on the given value.

pushValue
void pushValue(ParameterAxis axis, float value)

Force this parameter to take on the given value.

update
void update()

Update our bindings with the value of this parameter.

Properties

currentValue
float[] currentValue [@property getter]

The current value of the parameter.

dimensions
int dimensions [@property getter]

The dimensionality of the parameter.

elementCounts
uint[] elementCounts [@property getter]

Counts of elements in each axis.

lowerBound
float[] lowerBound [@property getter]

The lower bound of this parameter.

upperBound
float[] upperBound [@property getter]

The upper bound of this parameter.

Variables

defaults
vec2 defaults;

The default value of this parameter.

hpoints
vector!float hpoints;

Our horizontal keypoints' positions.

max
vec2 max;

The upper bounds of this parameter.

min
vec2 min;

The lower bounds of this parameter.

prev
vec2 prev;

The previous value of this parameter.

value
vec2 value;

The current value of this parameter.

vpoints
vector!float vpoints;

Our vertical keypoints' positions.

Inherited Members

From Parameter

onSerialize
void onSerialize(DataNode object)

Serialize this parameter.

onDeserialize
void onDeserialize(DataNode object, ModelState state)

Deserialize this parameter.

onFinalize
void onFinalize(Puppet puppet, ModelState state)

Finalizes the parameter.

guid
GUID guid;

The globally unique ID of this parameter.

name
nstring name;

The user-facing name of this parameter.

active
bool active;

Whether this parameter currently updates the model.

bindings
vector!ParameterBinding bindings;

The bindings of this parameter to puppet nodes.

dimensions
int dimensions [@property getter]

The dimensionality of the parameter.

elementCounts
uint[] elementCounts [@property getter]

Counts of elements in each axis.

currentValue
float[] currentValue [@property getter]

The current value of the parameter.

lowerBound
float[] lowerBound [@property getter]

The lower bound of this parameter.

upperBound
float[] upperBound [@property getter]

The upper bound of this parameter.

hasBinding
bool hasBinding(Node node, string prop)

Check whether this parameter has a binding to the given target.

hasAnyBindingsTo
bool hasAnyBindingsTo(Node node)

Check whether this parameter has any bindings to the given node.

serialize
void serialize(DataNode object)

Serializes this parameter.

deserialize
void deserialize(DataNode object, ModelState state)

Deserializes this parameter.

finalize
void finalize(Puppet puppet, ModelState state)

Finalizes the parameter.

update
void update()

Update our bindings with the value of this parameter.

Meta