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

Curve class for float values. More...

Inheritance diagram for CurveFloat:
Managed

Public Member Functions

proto external float 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 float 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 CurveFloat m_Curve;
}
void UsageExample(ConfigExample c)
{
for (int i = 0; i < 10; i++)
{
float 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 float values.
Definition CurveFloat.c:34
Definition attributes.c:38
static const string CurveDialog
Definition attributes.c:261

Member Function Documentation

◆ Compute()

proto external float CurveFloat.Compute ( float param)

Compute value at x.

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

◆ IsEmpty()

proto external bool CurveFloat.IsEmpty ( )

Is the curve empty and thus using default value?


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