internal PoseFragment(ref Binary binary, MetricIndex metricIndex)
            {
                samplingTime = SamplingTime.Invalid;

                this.metricIndex = metricIndex;

                var numFeatures = GetNumFeatures(ref binary, metricIndex);

                array = new NativeArray <float3>(numFeatures, Allocator.Temp);
            }
                public static PoseFragment Create(ref Binary binary, MetricIndex metricIndex, SamplingTime samplingTime)
                {
                    var factory = Create(ref binary, metricIndex);

                    factory.GenerateJointPositions(ref binary, samplingTime);

                    factory.GenerateJointVelocities(ref binary, samplingTime);

                    Assert.IsTrue(factory.writeIndex == factory.instance.array.Length);

                    factory.instance.samplingTime = samplingTime;

                    return(factory.instance);
                }
Ejemplo n.º 3
0
 /// <summary>
 /// Determines whether two metric indices are equal.
 /// </summary>
 /// <param name="metricIndex">The index to compare against the current index.</param>
 /// <returns>True if the specified index is equal to the current index; otherwise, false.</returns>
 public bool Equals(MetricIndex metricIndex)
 {
     return(value == metricIndex.value);
 }
Ejemplo n.º 4
0
 internal ref Metric GetMetric(MetricIndex index)
 {
     Assert.IsTrue(index < numMetrics);
     return(ref metrics[index]);
 }
 internal static int GetNumFeatures(ref Binary binary, MetricIndex metricIndex)
 {
     ref Metric metric = ref binary.GetMetric(metricIndex);
 public static Factory Create(ref Binary binary, MetricIndex metricIndex)
 {
     return(new Factory(ref binary, metricIndex));
 }
                public Factory(ref Binary binary, MetricIndex metricIndex)
                {
                    writeIndex = 0;

                    instance = PoseFragment.Create(ref binary, metricIndex);
                }
            internal static int GetNumFeatures(ref Binary binary, MetricIndex metricIndex)
            {
                var numFeatures = 0;

                ref var metric = ref binary.GetMetric(metricIndex);