internal SamplingStatePoly3(ParamPoly3Data poly3, float dsStepForApproximation = 0.1f) { m_poly3 = poly3; m_dsStepForApproximation = dsStepForApproximation; m_currentIdx = 0; var initialValues = new SimpsonsRuleValues(0, GeometrySampling.Poly3ComputeL(m_poly3, 0), 0); m_values = new[] { initialValues, GeometrySampling.Poly3ComputeSimpsonStep(m_poly3, initialValues, dsStepForApproximation) }; }
internal SamplingStatePoly3(Geometry geometry, float dsStepForApproximation = 0.1f) { if (geometry.geometryKind == GeometryKind.Poly3) { m_poly3 = new ParamPoly3Data(geometry.poly3Data); } else { m_poly3 = geometry.paramPoly3Data; } m_dsStepForApproximation = dsStepForApproximation; m_currentIdx = 0; var initialValues = new SimpsonsRuleValues(0, GeometrySampling.Poly3ComputeL(m_poly3, 0), 0); m_values = new[] { initialValues, GeometrySampling.Poly3ComputeSimpsonStep(m_poly3, initialValues, m_dsStepForApproximation) }; }