API ReferenceSandbox.MovieMaker
MovieTimeclass
Represents a duration of time in a movie. Uses fixed point so precision is consistent at any absolute time. Defaults to `Sandbox.MovieMaker.MovieTime.Zero`.
object→MovieTime
Methods17
Showing 17 methods
public Sandbox.MovieMaker.MovieTime Clamp(System.Nullable`1<Sandbox.MovieMaker.MovieTimeRange> range)
| Parameter | Type | Description |
|---|---|---|
| range | Nullable<MovieTimeRange> | — |
public virtual sealed int CompareTo(Sandbox.MovieMaker.MovieTime other)
| Parameter | Type | Description |
|---|---|---|
| other | MovieTime | — |
Returns:
int—public static Sandbox.MovieMaker.MovieTime Distance(Sandbox.MovieMaker.MovieTime a, Sandbox.MovieMaker.MovieTime b)
| Parameter | Type | Description |
|---|---|---|
| a | MovieTime | — |
| b | MovieTime | — |
public Sandbox.MovieMaker.MovieTime Floor(Sandbox.MovieMaker.MovieTime gridInterval)
| Parameter | Type | Description |
|---|---|---|
| gridInterval | MovieTime | — |
public static Sandbox.MovieMaker.MovieTime FromFrames(int frameCount, int frameRate)
| Parameter | Type | Description |
|---|---|---|
| frameCount | int | — |
| frameRate | int | — |
public static Sandbox.MovieMaker.MovieTime FromSeconds(double time)
| Parameter | Type | Description |
|---|---|---|
| time | double | — |
public static Sandbox.MovieMaker.MovieTime FromTicks(int ticks)
| Parameter | Type | Description |
|---|---|---|
| ticks | int | — |
public float GetFraction(Sandbox.MovieMaker.MovieTime time)
| Parameter | Type | Description |
|---|---|---|
| time | MovieTime | — |
Returns:
float—public int GetFrameCount(int frameRate)
Given a `frameRate`, 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 `Sandbox.MovieMaker.MovieTime.GetFrameIndex(System.Int32)` unless this time is exactly on a frame boundary.
| Parameter | Type | Description |
|---|---|---|
| frameRate | int | — |
Returns:
int—public static Sandbox.MovieMaker.MovieTime Lerp(Sandbox.MovieMaker.MovieTime a, Sandbox.MovieMaker.MovieTime b, double fraction)
| Parameter | Type | Description |
|---|---|---|
| a | MovieTime | — |
| b | MovieTime | — |
| fraction | double | — |
public static Sandbox.MovieMaker.MovieTime Max(Sandbox.MovieMaker.MovieTime a, Sandbox.MovieMaker.MovieTime b)
| Parameter | Type | Description |
|---|---|---|
| a | MovieTime | — |
| b | MovieTime | — |
No results match this filter.
Properties11
Showing 11 properties
public bool Sandbox.MovieMaker.MovieTime.IsNegative { get; set; }
Returns:
bool—public bool Sandbox.MovieMaker.MovieTime.IsPositive { get; set; }
Returns:
bool—public bool Sandbox.MovieMaker.MovieTime.IsZero { get; set; }
Returns:
bool—public static System.Collections.Generic.IReadOnlyList`1<int> Sandbox.MovieMaker.MovieTime.SupportedFrameRates { get; set; }
Frame rates `<= 120` that can be perfectly represented by `Sandbox.MovieMaker.MovieTime.TickRate`, in ascending order. Venturing outside these rates will lead to some frames being slightly different durations than others.
Returns:
IReadOnlyList<int>—public int Sandbox.MovieMaker.MovieTime.Ticks { get; set; }
Returns:
int—public double Sandbox.MovieMaker.MovieTime.TotalSeconds { get; set; }
Returns:
double—No results match this filter.