Enfusion Script API
Loading...
Searching...
No Matches
CurveVector Interface Reference

Curve class for vector values. More...

Inheritance diagram for CurveVector:
Managed

Public Member Functions

proto external vector Compute (float param)
 Compute value at x.
 
proto external bool IsEmpty ()
 Is the curve empty and thus using default value?
 
- Public Member Functions inherited from Managed
proto external ref Managed Clone ()
 Return shallow copy of object, or null if it is not allowed (not public constructor)
 

Detailed Description

Curve class for vector values.

Expected to use as a property (using Attribute) and filled from config edited in dedicated Curve dialog in Workbench. UIWidgets.CurveDialog for property params details

class ConfigExample
{
[Attribute(uiwidget: UIWidgets.CurveDialog, params:"type=Akima, ends=OpenFlat, paramRange=0 1 fixed, valueRange=0 1 fixed")]
ref CurveVector m_Curve;
}
void UsageExample(ConfigExample c)
{
for (int i = 0; i < 10; i++)
{
vector val = c.m_Curve.Compute(0.1 * i);
Print("[" + i + "] = " + val);
}
}
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
Definition attributes.c:285
Curve class for vector values.
Definition CurveVector.c:34
Definition attributes.c:38
static const string CurveDialog
Definition attributes.c:261
Definition vector.c:13

Member Function Documentation

◆ Compute()

proto external vector CurveVector.Compute ( float param)

Compute value at x.

This method finds segment which x belongs to and performs local interpolation.

◆ IsEmpty()

proto external bool CurveVector.IsEmpty ( )

Is the curve empty and thus using default value?


The documentation for this interface was generated from the following file: