hkpListAgent.h
上传用户:yisoukefu
上传日期:2020-08-09
资源大小:39506k
文件大小:5k
源码类别:

其他游戏

开发平台:

Visual C++

  1. /* 
  2.  * 
  3.  * Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's
  4.  * prior written consent. This software contains code, techniques and know-how which is confidential and proprietary to Havok.
  5.  * Level 2 and Level 3 source code contains trade secrets of Havok. Havok Software (C) Copyright 1999-2009 Telekinesys Research Limited t/a Havok. All Rights Reserved. Use of this software is subject to the terms of an end user license agreement.
  6.  * 
  7.  */
  8. #ifndef HK_COLLIDE2_LISTAGENT_H
  9. #define HK_COLLIDE2_LISTAGENT_H
  10. #include <Physics/Collide/Agent/hkpCollisionAgent.h>
  11. #include <Physics/Collide/Dispatch/hkpCollisionDispatcher.h>
  12. #include <Physics/Internal/Collide/Agent3/Machine/1n/hkpAgent1nTrack.h>
  13. class hkpCollisionDispatcher;
  14. /// This agent handles collisions between hkListShapes and other shapes. An hkpListAgent gets
  15. /// further agents from the dispatcher to handle collisions for each of the list shape's child shapes.
  16. class hkpListAgent : public hkpCollisionAgent
  17. {
  18. public:
  19. static void HK_CALL initAgentFunc       (hkpCollisionDispatcher::AgentFuncs& f);
  20. static void HK_CALL initAgentFuncInverse(hkpCollisionDispatcher::AgentFuncs& f);
  21. /// Registers this agent with the collision dispatcher.
  22. static void HK_CALL registerAgent(hkpCollisionDispatcher* dispatcher);
  23. // hkpCollisionAgent interface implementation.
  24. virtual void processCollision(const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpProcessCollisionInput& input, hkpProcessCollisionOutput& output);
  25. // hkpCollisionAgent interface implementation.
  26. virtual void linearCast( const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpLinearCastCollisionInput& input, hkpCdPointCollector& collector, hkpCdPointCollector* startCollector );
  27. // hkpCollisionAgent interface implementation.
  28. static void HK_CALL staticLinearCast( const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpLinearCastCollisionInput& input, hkpCdPointCollector& collector, hkpCdPointCollector* startCollector );
  29. // hkpCollisionAgent interface implementation.
  30. virtual void getClosestPoints( const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpCollisionInput& input, hkpCdPointCollector& pointDetails);
  31. // hkpCollisionAgent interface implementation.
  32. static void HK_CALL staticGetClosestPoints( const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpCollisionInput& input, class hkpCdPointCollector& collector  );
  33. /// hkpCollisionAgent interface implementation.
  34. virtual void getPenetrations(const  hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpCollisionInput& input, hkpCdBodyPairCollector& collector );
  35. // hkpCollisionAgent interface implementation.
  36. static void HK_CALL staticGetPenetrations( const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpCollisionInput& input, hkpCdBodyPairCollector& collector );
  37. // hkpCollisionAgent interface implementation.
  38. virtual void updateShapeCollectionFilter( const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpCollisionInput& input, hkCollisionConstraintOwner& constraintOwner );
  39.         virtual void calcContentStatistics( hkStatisticsCollector* collector, const hkClass* cls ) const;
  40. // hkpCollisionAgent interface implementation.
  41. virtual void invalidateTim( const hkpCollisionInput& input);
  42. // hkpCollisionAgent interface implementation.
  43. virtual void warpTime(hkTime oldTime, hkTime newTime, const hkpCollisionInput& input);
  44. // hkpCollisionAgent interface implementation.
  45. virtual void cleanup(hkCollisionConstraintOwner& info);
  46. public:
  47. /// Constructor, called by the agent creation functions.
  48. hkpListAgent( const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpCollisionInput& input, hkpContactMgr* mgr);
  49. /// Agent creation function used by the hkpCollisionDispatcher.
  50. static hkpCollisionAgent* HK_CALL createListAAgent(const  hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpCollisionInput& input, hkpContactMgr* contactMgr);
  51. /// Agent creation function used by the hkpCollisionDispatcher.
  52. static hkpCollisionAgent* HK_CALL createListBAgent( const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpCollisionInput& input, hkpContactMgr* contactMgr);
  53. protected:
  54. hkpCollisionDispatcher* m_dispatcher;
  55. hkpAgent1nTrack  m_agentTrack;
  56. };
  57. #endif // HK_COLLIDE2_LISTAGENT_H
  58. /*
  59. * Havok SDK - NO SOURCE PC DOWNLOAD, BUILD(#20090216)
  60. * Confidential Information of Havok.  (C) Copyright 1999-2009
  61. * Telekinesys Research Limited t/a Havok. All Rights Reserved. The Havok
  62. * Logo, and the Havok buzzsaw logo are trademarks of Havok.  Title, ownership
  63. * rights, and intellectual property rights in the Havok software remain in
  64. * Havok and/or its suppliers.
  65. * Use of this software for evaluation purposes is subject to and indicates
  66. * acceptance of the End User licence Agreement for this product. A copy of
  67. * the license is included with this software and is also available at www.havok.com/tryhavok.
  68. */