Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

Ernegien

By: a guest on Jul 7th, 2008  |  syntax: C++  |  size: 2.82 KB  |  hits: 139  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #pragma once
  2.  
  3. // lazy library includes
  4. #pragma comment(lib, "hkBase.lib")
  5. #pragma comment(lib, "hkSerialize.lib")
  6. #pragma comment(lib, "hkSceneData.lib")
  7. #pragma comment(lib, "hkVisualize.lib")
  8. #pragma comment(lib, "hkCompat.lib")
  9. #pragma comment(lib, "hkpCollide.lib")
  10. #pragma comment(lib, "hkpConstraintSolver.lib")
  11. #pragma comment(lib, "hkpDynamics.lib")
  12. #pragma comment(lib, "hkpInternal.lib")
  13. #pragma comment(lib, "hkpUtilities.lib")
  14. #pragma comment(lib, "hkpVehicle.lib")
  15. #pragma comment(lib, "hkaAnimation.lib")
  16. #pragma comment(lib, "hkaInternal.lib")
  17. #pragma comment(lib, "hkaRagdoll.lib")
  18. #pragma comment(lib, "hkgBridge.lib")
  19. #pragma comment(lib, "hkgCommon.lib")
  20. #pragma comment(lib, "hkgDx9.lib")
  21. #pragma comment(lib, "hkgDx9s.lib")
  22. #pragma comment(lib, "hkgOgl.lib")
  23. #pragma comment(lib, "dxguid.lib")
  24. #pragma comment(lib, "opengl32.lib")
  25.  
  26. // Include the hkbase header before any other hkbase includes.
  27. #include <Common/Base/hkBase.h>
  28. #include <Common/Base/Types/Geometry/hkStridedVertices.h>
  29. #include <Common/Base/System/hkBaseSystem.h>
  30. #include <Common/Base/Memory/Memory/Pool/hkPoolMemory.h>
  31. #include <Common/Base/Memory/Memory/Debug/hkDebugMemory.h>
  32. #include <Common/Base/System/Io/IStream/hkIstream.h>
  33.  
  34. // Include the hkdynamics header before any other hkdynamics includes.
  35. #include <Physics/Dynamics/hkpDynamics.h>
  36. #include <Physics/Dynamics/World/hkpWorld.h>
  37. #include <Physics/Dynamics/World/Util/hkpWorldOperationUtil.h>
  38. #include <Physics/Dynamics/Entity/hkpRigidBody.h>
  39. #include <Physics/Dynamics/Entity/hkpRigidBodyCInfo.h>
  40. #include <Physics/Dynamics/Entity/hkpEntity.h>
  41.  
  42. // Include the hkcollide header before any other hkcollide includes.
  43. #include <Physics/Collide/hkpCollide.h>
  44. #include <Physics/Collide/Shape/hkpShape.h>
  45. #include <Physics/Collide/Shape/Convex/hkpConvexShape.h>
  46. #include <Physics/Collide/Shape/Convex/ConvexVertices/hkpConvexVerticesShape.h>
  47. #include <Physics/Collide/Shape/Convex/Box/hkpBoxShape.h>
  48. #include <Physics/Collide/Shape/Convex/Sphere/hkpSphereShape.h>
  49. #include <Physics/Collide/Shape/Convex/Cylinder/hkpCylinderShape.h>
  50. #include <Physics/Collide/Dispatch/hkpAgentRegisterUtil.h>
  51.  
  52. // Utilities
  53. #include <Physics/Utilities/Dynamics/Inertia/hkpInertiaTensorComputer.h>
  54.  
  55. extern "C" int printf(const char* fmt, ...); // For printf, used by the error handler
  56. // Stub function to print any error report functionality to stdout
  57. // std::puts(...) could be used here alternatively
  58. static void ReportError(const char* str, void* errorOutputObject)
  59. {
  60.     printf("%s", str);
  61. }
  62.  
  63. // allows for input of game objects into havok sdk
  64. class Havok
  65. {
  66.         public:
  67.         hkpWorld* World;
  68.         List<Object*> Objects;
  69.  
  70.         hkThreadMemory* ThreadMemory;
  71.  
  72.         Havok(void);
  73.         ~Havok(void);
  74.  
  75.         void AddObject(Object* object);
  76.         void RemoveObject(Object* object);
  77.  
  78.         void Update(float timestep);
  79. };