physxTriggerHandler.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Filename: physxTriggerHandler.h
  2. // Created by: pratt (May 16, 2006)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) Carnegie Mellon University. All rights reserved.
  8. //
  9. // All use of this software is subject to the terms of the revised BSD
  10. // license. You should have received a copy of this license along
  11. // with this source code in a file named "LICENSE."
  12. //
  13. ////////////////////////////////////////////////////////////////////
  14. #ifndef PHYSXTRIGGERHANDLER_H
  15. #define PHYSXTRIGGERHANDLER_H
  16. #ifdef HAVE_PHYSX
  17. #include "pandabase.h"
  18. #include "pvector.h"
  19. #include "physx_enumerations.h"
  20. #include "physxManager.h"
  21. #include "luse.h"
  22. class PhysxShape;
  23. #include "NxPhysics.h"
  24. ////////////////////////////////////////////////////////////////////
  25. // Class : PhysxTriggerHandler
  26. // Description :
  27. ////////////////////////////////////////////////////////////////////
  28. class EXPCL_PANDAPHYSX PhysxTriggerHandler : public NxUserTriggerReport {
  29. PUBLISHED:
  30. void clear_events();
  31. void throw_events();
  32. public:
  33. void onTrigger(NxShape &nTriggerShape, NxShape &nOtherShape, NxTriggerFlag status);
  34. private:
  35. struct PhysxTriggerEvent {
  36. NxShape *nTriggerShape;
  37. NxShape *nOtherShape;
  38. NxTriggerFlag status;
  39. };
  40. pvector<PhysxTriggerEvent> events;
  41. };
  42. #include "physxTriggerHandler.I"
  43. #endif // HAVE_PHYSX
  44. #endif // PHYSXTRIGGERHANDLER_H