コード例 #1
0
ファイル: ForceFactory.cs プロジェクト: Tschouns/BlitzPhysics
        /// <summary>
        /// Initializes a new instance of the <see cref="ForceFactory"/> class.
        /// </summary>
        public ForceFactory(
            ILineCalculationHelper lineCalculationHelper,
            ISupportFunctions <Polygon> polygonSupportFunctions)
        {
            ArgumentChecks.AssertNotNull(lineCalculationHelper, nameof(lineCalculationHelper));
            ArgumentChecks.AssertNotNull(polygonSupportFunctions, nameof(polygonSupportFunctions));

            this._lineCalculationHelper   = lineCalculationHelper;
            this._polygonSupportFunctions = polygonSupportFunctions;
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BodyFlowResistance"/> class.
        /// </summary>
        public BodyLinearFlowResistance(
            ILineCalculationHelper lineCalculationHelper,
            ISupportFunctions <TShapeFigure> supportFunctions,
            double density)
        {
            ArgumentChecks.AssertNotNull(lineCalculationHelper, nameof(lineCalculationHelper));
            ArgumentChecks.AssertNotNull(supportFunctions, nameof(supportFunctions));
            ArgumentChecks.AssertIsPositive(density, nameof(density));

            this._lineCalculationHelper = lineCalculationHelper;
            this._supportFunctions      = supportFunctions;
            this._density = density;
        }
コード例 #3
0
ファイル: GjkAlgorithm.cs プロジェクト: Tschouns/BlitzPhysics
        /// <summary>
        /// Initializes a new instance of the <see cref="GjkAlgorithm{TFigure1,TFigure2}"/> class.
        /// </summary>
        public GjkAlgorithm(
            ISupportFunctions<TFigure1> figure1SupportFunctions,
            ISupportFunctions<TFigure2> figure2SupportFunctions,
            ILineCalculationHelper lineCalculationHelper,
            ITriangleCalculationHelper triangleCalculationHelper)
        {
            ArgumentChecks.AssertNotNull(figure1SupportFunctions, nameof(figure1SupportFunctions));
            ArgumentChecks.AssertNotNull(figure2SupportFunctions, nameof(figure2SupportFunctions));
            ArgumentChecks.AssertNotNull(lineCalculationHelper, nameof(lineCalculationHelper));
            ArgumentChecks.AssertNotNull(triangleCalculationHelper, nameof(triangleCalculationHelper));

            this._figure1SupportFunctions = figure1SupportFunctions;
            this._figure2SupportFunctions = figure2SupportFunctions;
            this._lineCalculationHelper = lineCalculationHelper;
            this._triangleCalculationHelper = triangleCalculationHelper;
        }
コード例 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PolygonSupportFunctions"/> class.
        /// </summary>
        public PolygonSupportFunctions(ILineCalculationHelper lineCalculationHelper)
        {
            ArgumentChecks.AssertNotNull(lineCalculationHelper, nameof(lineCalculationHelper));

            this._lineCalculationHelper = lineCalculationHelper;
        }