angularIntegrator.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Filename: angularIntegrator.h
  2. // Created by: charles (09Aug00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://etc.cmu.edu/panda3d/docs/license/ .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef ANGULARINTEGRATOR_H
  19. #define ANGULARINTEGRATOR_H
  20. #include "baseIntegrator.h"
  21. #include "angularForce.h"
  22. #include "configVariableDouble.h"
  23. ////////////////////////////////////////////////////////////////////
  24. // Class : BaseAngularIntegrator
  25. // Description : Pure virtual base class for physical modeling.
  26. // Takes physically modelable objects and applies
  27. // forces to them.
  28. ////////////////////////////////////////////////////////////////////
  29. class EXPCL_PANDAPHYSICS AngularIntegrator : public BaseIntegrator {
  30. PUBLISHED:
  31. virtual ~AngularIntegrator();
  32. public:
  33. void integrate(Physical *physical, AngularForceVector &forces,
  34. float dt);
  35. virtual void output(ostream &out) const;
  36. virtual void write(ostream &out, unsigned int indent=0) const;
  37. protected:
  38. AngularIntegrator();
  39. private:
  40. static ConfigVariableDouble _max_angular_dt;
  41. // this allows baseAngularIntegrator to censor/modify data that the
  42. // actual integration function receives.
  43. virtual void child_integrate(Physical *physical, AngularForceVector &forces,
  44. float dt) = 0;
  45. };
  46. #endif // ANGULARINTEGRATOR_H