Esempio n. 1
0
        internal static PointSampleLocal SamplePoly3(Poly3Data poly3, float sLocal)
        {
            // To keep our code paths consistent, we'll just create state for stateful sampling, then discard it
            var samplingState = new SamplingStatePoly3(poly3);

            return(SamplePoly3(ref samplingState, sLocal));
        }
Esempio n. 2
0
        internal static PointSampleLocal SamplePoly3(ref SamplingStatePoly3 state, float sLocal)
        {
            while (state.NextValues.s < sLocal)
            {
                state.SetNextValues(
                    Poly3ComputeSimpsonStep(state.m_poly3, state.CurrentValues, state.m_dsStepForApproximation));
            }

            return(Poly3ConstructSample(state.m_poly3, sLocal, state.CurrentValues, state.NextValues));
        }
Esempio n. 3
0
 public SamplingStateGeometry(Geometry geometry)
 {
     if (geometry.geometryKind == GeometryKind.Poly3 || geometry.geometryKind == GeometryKind.ParamPoly3)
     {
         poly3 = new SamplingStatePoly3(geometry);
     }
     else
     {
         poly3 = default;
     }
 }