Example #1
0
        public bool LoadSavedExport(UInt32 step)
        {
            if (step > _maxStep)
            {
                return(false);
            }

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

            int index = CalculateExportIndex(step);

            PBodyExport3D export = bodyExports[index];

            linearVelocity  = export.linearVelocity;
            angularVelocity = export.angularVelocity;
            position        = export.position;
            orientation     = export.orientation;
            orientation0    = export.orientation0;
            awake           = export.awake;
            sleepTime       = export.sleepTime;

            Parallel3D.UpdateBodyTransformForRollback(this, position, orientation, orientation0);
            Parallel3D.UpdateBodyVelocity(this, linearVelocity, angularVelocity);
            Parallel3D.SetAwakeForRollback(this, awake, sleepTime);
            return(true);
        }