Difference between revisions of "DOMCurveValue"

From Virtual World Web Wiki
Jump to: navigation, search
(Documentation for the DOMCurveValue class)
(Documentation for the DOMCurveValue class)
Line 15: Line 15:
 
===Methods===
 
===Methods===
 
:{{CSharp|bool CheckParent(DOMObject parent)}}
 
:{{CSharp|bool CheckParent(DOMObject parent)}}
 +
::
 +
::Called on DOMObject derived types just before they are added to the DOM to ensure their parent is appropriate.
  
 
:{{CSharp|object GetInterpolatedValue(DOMCurveValue other, Single time)}}
 
:{{CSharp|object GetInterpolatedValue(DOMCurveValue other, Single time)}}

Revision as of 20:34, 18 October 2016

Remarks [edit]

Properties

DOMCurveKeyframe Keyframe {get;}

Constructors

DOMCurveValue()
DOMCurveValue(string title)
DOMCurveValue(string title, object value)

Methods

bool CheckParent(DOMObject parent)
Called on DOMObject derived types just before they are added to the DOM to ensure their parent is appropriate.
object GetInterpolatedValue(DOMCurveValue other, Single time)
This method needs to be overridden in derived classes to support more interesting kinds of interpolation.
Out of the box, we handle some primitive types and do a liner interpolation.
If a type isn't recognized we just return our own value resulting in a stepped, square-wave-like jump from
keyframe to keyframe (fine for something like a resource value)
object GetKeyframeValue()
Color32 LerpColor32(Color32 a, Color32 b, Single t)
Point3D LerpPoint3D(Point3D a, Point3D b, Single t)