public override void PushDataToSolver(ObiBatchedConstraints constraints)
        {
            if (constraints == null || constraints.Actor == null || !constraints.Actor.InSolver)
            {
                return;
            }

            ObiBendTwistConstraints dc = (ObiBendTwistConstraints)constraints;

            for (int i = 0; i < restDarbouxVectors.Count; i++)
            {
                solverStiffnesses[i] = new Vector3(StiffnessToCompliance(dc.bendStiffness1),
                                                   StiffnessToCompliance(dc.bendStiffness2),
                                                   StiffnessToCompliance(dc.torsionStiffness));
            }

            Oni.SetBendTwistConstraints(batch, solverIndices, solverDarboux, solverStiffnesses, ConstraintCount);
        }
Пример #2
0
 public void OnEnable()
 {
     constraints = (ObiBendTwistConstraints)target;
 }