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)); }
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)); }
public SamplingStateGeometry(Geometry geometry) { if (geometry.geometryKind == GeometryKind.Poly3 || geometry.geometryKind == GeometryKind.ParamPoly3) { poly3 = new SamplingStatePoly3(geometry); } else { poly3 = default; } }