private void InitProperty(Vector3 force, float mass, float drag, DragModes dragMode, SolverModes solverMode) { Force = force; Mass = mass; Drag = drag; DragMode = dragMode; SolverMode = solverMode; }
static extern void btContactSolverInfoData_setSolverMode(IntPtr obj, SolverModes value);
/// <summary> /// /// </summary> /// <param name="force"></param> /// <param name="mass"></param> /// <param name="drag"></param> /// <param name="dragMode">Drag代表的含义,Velocity表示drag=acc/v;SqrVelocity表示drag=acc/v^2</param> /// <param name="solverMode">Solver的模式,Interation表示使用迭代模拟,与Unity3d较为符合;EquationSolution表示使用运动微分方程的解,更接近理论值</param> public RigidbodySolver(Vector3 force, float mass, float drag, DragModes dragMode, SolverModes solverMode) { InitProperty(force, mass, drag, dragMode, solverMode); }
static extern void btContactSolverInfoData_setSolverMode(IntPtr obj, SolverModes value);