PhysicsFixedConstraint.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef PHYSICSFIXEDCONSTRAINT_H_
  2. #define PHYSICSFIXEDCONSTRAINT_H_
  3. #include "PhysicsGenericConstraint.h"
  4. namespace gameplay
  5. {
  6. /**
  7. * Represents a constraint where two rigid bodies
  8. * (or one rigid body and the world) are bound together.
  9. *
  10. * (This is similar in concept to parenting one node to another,
  11. * but can be used in specific situations for a more appropriate effect
  12. * (e.g. for implementing sticky projectiles, etc.).)
  13. */
  14. class PhysicsFixedConstraint : public PhysicsGenericConstraint
  15. {
  16. friend class PhysicsController;
  17. protected:
  18. /**
  19. * @see PhysicsGenericConstraint
  20. */
  21. PhysicsFixedConstraint(PhysicsRigidBody* a, PhysicsRigidBody* b);
  22. /**
  23. * Destructor.
  24. */
  25. ~PhysicsFixedConstraint();
  26. // Note: We make these functions protected to prevent usage
  27. // (these are public in the base class, PhysicsGenericConstraint).
  28. /**
  29. * Protected to prevent usage.
  30. */
  31. inline void setAngularLowerLimit(const Vector3& limit);
  32. /**
  33. * Protected to prevent usage.
  34. */
  35. inline void setAngularUpperLimit(const Vector3& limit);
  36. /**
  37. * Protected to prevent usage.
  38. */
  39. inline void setLinearLowerLimit(const Vector3& limit);
  40. /**
  41. * Protected to prevent usage.
  42. */
  43. inline void setLinearUpperLimit(const Vector3& limit);
  44. };
  45. }
  46. #include "PhysicsFixedConstraint.inl"
  47. #endif