TimeStep.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Box2D.XNA port of Box2D:
  3. * Copyright (c) 2009 Brandon Furtwangler, Nathan Furtwangler
  4. *
  5. * Original source Box2D:
  6. * Copyright (c) 2006-2009 Erin Catto http://www.gphysics.com
  7. *
  8. * This software is provided 'as-is', without any express or implied
  9. * warranty. In no event will the authors be held liable for any damages
  10. * arising from the use of this software.
  11. * Permission is granted to anyone to use this software for any purpose,
  12. * including commercial applications, and to alter it and redistribute it
  13. * freely, subject to the following restrictions:
  14. * 1. The origin of this software must not be misrepresented; you must not
  15. * claim that you wrote the original software. If you use this software
  16. * in a product, an acknowledgment in the product documentation would be
  17. * appreciated but is not required.
  18. * 2. Altered source versions must be plainly marked as such, and must not be
  19. * misrepresented as being the original software.
  20. * 3. This notice may not be removed or altered from any source distribution.
  21. */
  22. namespace FarseerPhysics.Dynamics
  23. {
  24. /// <summary>
  25. /// This is an internal structure.
  26. /// </summary>
  27. public struct TimeStep
  28. {
  29. /// <summary>
  30. /// Time step (Delta time)
  31. /// </summary>
  32. public float dt;
  33. /// <summary>
  34. /// dt * inv_dt0
  35. /// </summary>
  36. public float dtRatio;
  37. /// <summary>
  38. /// Inverse time step (0 if dt == 0).
  39. /// </summary>
  40. public float inv_dt;
  41. }
  42. }