Exemplo n.º 1
0
        private void RemoveFromSolver(ObiSolver solver)
        {
            // remove the constraint batch from the solver
            // (no need to destroy it as its destruction is managed by the solver)
            // Oni.RemoveBatch(actor1.solver.OniSolver, batch);
            if (inSolver && m_BatchImpl != null)
            {
                solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IStitchConstraintsBatchImpl);
                m_BatchImpl.Destroy();
                m_BatchImpl = null;

                inSolver = false;
            }
        }
Exemplo n.º 2
0
        private void AddToSolver(ObiSolver solver)
        {
            if (!inSolver)
            {
                inSolver = true;

                // create a constraint batch (CreateStitchConstraints() in burst returns a singleton):
                m_BatchImpl = solver.implementation.CreateConstraintsBatch(Oni.ConstraintType.Stitch) as IStitchConstraintsBatchImpl;

                // push current data to solver:
                PushDataToSolver();

                // enable/disable the batch:
                m_BatchImpl.enabled = isActiveAndEnabled;
            }
        }
Exemplo n.º 3
0
 public void RemoveBatch(IStitchConstraintsBatchImpl batch)
 {
     batches.Remove(batch as BurstStitchConstraintsBatch);
 }