angularForce.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // Filename: angularForce.h
  2. // Created by: charles (08Aug00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001, 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://www.panda3d.org/license.txt .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef ANGULARFORCE_H
  19. #define ANGULARFORCE_H
  20. #include "baseForce.h"
  21. ////////////////////////////////////////////////////////////////////
  22. // Class : AngularForce
  23. // Description : pure virtual parent of all quat-based forces.
  24. ////////////////////////////////////////////////////////////////////
  25. class EXPCL_PANDAPHYSICS AngularForce : public BaseForce {
  26. private:
  27. virtual LVector3f get_child_vector(const PhysicsObject *po) = 0;
  28. protected:
  29. AngularForce(void);
  30. AngularForce(const AngularForce &copy);
  31. PUBLISHED:
  32. virtual ~AngularForce(void);
  33. virtual AngularForce *make_copy(void) const = 0;
  34. LVector3f get_vector(const PhysicsObject *po);
  35. virtual bool is_linear(void) const;
  36. public:
  37. static TypeHandle get_class_type(void) {
  38. return _type_handle;
  39. }
  40. static void init_type(void) {
  41. BaseForce::init_type();
  42. register_type(_type_handle, "AngularForce",
  43. BaseForce::get_class_type());
  44. }
  45. virtual TypeHandle get_type(void) const {
  46. return get_class_type();
  47. }
  48. virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
  49. private:
  50. static TypeHandle _type_handle;
  51. };
  52. #endif // ANGULARFORCE_H