BEPUphysics.EntityStateManagement.StateReadBuffers.Enable C# (CSharp) Method

Enable() private method

private Enable ( ) : void
return void
        internal void Enable()
        {
            //Turn everything on.
            lock (FlipLocker)
            {

                int initialCount = Math.Max(manager.entities.Count, 64);
                backBuffer = new MotionState[initialCount];
                frontBuffer = new MotionState[initialCount];
                for (int i = 0; i < manager.entities.Count; i++)
                {
                    Entity entity = manager.entities[i];
                    backBuffer[i].Position = entity.position;
                    backBuffer[i].Orientation = entity.orientation;
                    backBuffer[i].LinearVelocity = entity.linearVelocity;
                    backBuffer[i].AngularVelocity = entity.angularVelocity;
                }
                Array.Copy(backBuffer, frontBuffer, backBuffer.Length);
            }
        }