Exemplo n.º 1
0
        public bool LoadSavedExport(UInt32 step)
        {
            if (step > _maxStep)
            {
                return(false);
            }

            if (step < _minStep)
            {
                return(false);
            }

            int index = CalculateExportIndex(step);

            PBodyExport2D export = bodyExports[index];

            linearVelocity  = export.linearVelocity;
            angularVelocity = export.angularVelocity;
            position        = export.position;
            angle           = export.angle;

            Parallel2D.UpdateBodyTransForm(this, position, angle);
            Parallel2D.UpdateBodyVelocity(this, linearVelocity, angularVelocity);

            return(true);
        }