Sampler

class Communicator.Animation.Sampler()

Describes how the keyframes in a buffer are sampled.

Constructors


Constructors

Sampler.constructor(buffer, interpolationType)

Creates a new sampler for a KeyframeBuffer

Arguments
Return type

Sampler()

Properties

Sampler.buffer
Type

KeyframeBuffer()

Sampler.interpolationType
Type

InterpolationType

Methods

interpolateQuat

Sampler.interpolateQuat(t, out)

Computes an interpolated quaternion for the given frame.

Arguments
  • t (number()) –

  • out (Quaternion()) –

Return type

void

interpolateScalar

Sampler.interpolateScalar(t)

Computes an interpolated scalar value for the given frame.

Arguments
  • t (number()) –

Return type

number

interpolateVec3

Sampler.interpolateVec3(t, out)

Computes an interpolated Vector 3 value for the given frame.

Arguments
Return type

void

interpolateVec3CubicSpline

Sampler.interpolateVec3CubicSpline(k0, k1, t, out)

Performs Cubic Spline Interpolation on the Vector3 values at keyframes beginning at indices k0 and k1

Arguments
Return type

void