Struct SamplingTime
A sampling time is used to uniquely identfy a sub-sampled animation frame.
Namespace: Unity.Kinematica
Syntax
[Data("Sampling Time", DataType.Flag.None)]
public struct SamplingTime
Remarks
A sampling time is a construct that is similar in nature to a time index. It serves exactly the same purpose but carries additional information that enables sub-sampling.
Fields
theta
Denotes a blend weight between 0 and 1 that control sub-frame sampling.
Declaration
public float theta
Field Value
Type | Description |
---|---|
Single |
Remarks
The blend weight 'theta" is used for sub-frame sampling. A value of 0 conceptionally refers to the animation frame that the time index refers to. A value of 1 refers to its immediate next neighboring frame.
timeIndex
Denotes the time index this sampling time refers to.
Declaration
public TimeIndex timeIndex
Field Value
Type | Description |
---|---|
TimeIndex |
Properties
frameIndex
Denotes the frame index relative to the beginning of the segment that this sampling time refers to.
Declaration
public int frameIndex { get; }
Property Value
Type | Description |
---|---|
Int32 |
Invalid
Invalid sampling time.
Declaration
public static SamplingTime Invalid { get; }
Property Value
Type | Description |
---|---|
SamplingTime |
IsValid
Determines if the given sampling time is valid or not.
Declaration
public bool IsValid { get; }
Property Value
Type | Description |
---|---|
Boolean | True if the sampling time is valid; false otherwise. |
segmentIndex
Denotes the segment this sampling time refers to.
Declaration
public int segmentIndex { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
Create(TimeIndex, Single)
Create a sampling time from a time index and a theta value.
Declaration
public static SamplingTime Create(TimeIndex timeIndex, float theta = 0F)
Parameters
Type | Name | Description |
---|---|---|
TimeIndex | timeIndex | The time index that the sampling time should refer to. |
Single | theta | The theta value that the sampling time should refer to. |
Returns
Type | Description |
---|---|
SamplingTime |