Skip to content

SineMaterialDriver

Inheritance 2 ancestors · 48 siblings

Class Documentation

Edit documentation

A float driver that returns a sine wave of another driver:

sin(mDriver × mFrequency) × mScale + mBias

The driver reads no clock. Time enters only through mDriver, which in shipped data is almost always a TimeMaterialDriver.

Properties

mDriver

Pointer<ILogicFloatDriver> = null
Edit documentation

The driver that supplies the angle. It must be set: there is no fallback to the game time, and the client does not check for a missing operand.

mFrequency

F32 = 1
Edit documentation

A factor on the value of mDriver. The product is the angle in radians, so with a time in seconds one full wave takes 2π ÷ mFrequency seconds.

mScale

F32 = 1
Edit documentation

The amplitude. The wave swings between mBias - mScale and mBias + mScale.