Parameter1D

1D variant of a parameter.

Constructors

this
this(string name)

Construct a new named parameter.

Members

Functions

findKeypointAndNormal
ptrdiff_t findKeypointAndNormal(float pos, float norm)

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

lerp
float lerp(float norm)

Linearly interpolate from min to max by the given value.

normalize
float normalize(float pos)

Normalize the given position 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(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
float defaults;

The default value of this parameter.

max
float max;

The upper bound of this parameter.

min
float min;

The lower bound of this parameter.

points
vector!float points;

Our keypoints' positions.

prev
float prev;

The previous value of this parameter.

value
float value;

The current value of this parameter.

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