Api Sandbox MovieMaker MovieTime
struct

MovieTime

public sealed struct MovieTime

Represents a duration of time in a movie. Uses fixed point so precision is consistent at any absolute time. Defaults to Zero.

Properties

Name Type Description
Zero static MovieTime
Epsilon static MovieTime
MinValue static MovieTime
MaxValue static MovieTime
SupportedFrameRates static IReadOnlyList<Int32> Frame rates &lt;= 120 that can be perfectly represented by TickRate, in ascending order. Venturing outside these rates will lead to some frames being slightly different durations than others.
Ticks Int32
IsZero Boolean
IsPositive Boolean
IsNegative Boolean
TotalSeconds Double
Absolute MovieTime

Methods

static MovieTime FromTicks(Int32 ticks)
static MovieTime FromSeconds(Double time)
static MovieTime FromFrames(Int32 frameCount, Int32 frameRate)
static MovieTime Max(MovieTime a, MovieTime b)
static MovieTime Min(MovieTime a, MovieTime b)
static MovieTime Distance(MovieTime a, MovieTime b)
static MovieTime Lerp(MovieTime a, MovieTime b, Double fraction)
MovieTime Clamp(MovieTimeRange? range)
MovieTime Floor(MovieTime gridInterval)
MovieTime Round(MovieTime gridInterval)
Int32 GetFrameIndex(Int32 frameRate)

Given a , how many frames have passed before reaching this time.

Int32 GetFrameIndex(Int32 frameRate, MovieTime remainder)

Given a , how many frames have passed before reaching this time, and how far into the current frame are we.

Int32 GetFrameIndex(MovieTime frameInterval)
Int32 GetFrameIndex(MovieTime frameInterval, MovieTime remainder)
Int32 GetFrameCount(Int32 frameRate)

Given a , how many frames would need to be allocated to represent every moment of time up until now. This is always at least 1, and will be 1 more than Int32) unless this time is exactly on a frame boundary.

Single GetFraction(MovieTime time)
virtual Int32 CompareTo(MovieTime other)

Fields

Name Type Description
TickRate static Int32 How many Ticks per second. This value should nicely divide into common frame rates.
Assembly: Sandbox.Engine Namespace: Sandbox.MovieMaker Full Name: Sandbox.MovieMaker.MovieTime