Opcode.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2. /*
  3. * OPCODE - Optimized Collision Detection
  4. * Copyright (C) 2001 Pierre Terdiman
  5. * Homepage: http://www.codercorner.com/Opcode.htm
  6. */
  7. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  8. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  9. /**
  10. * Main file for Opcode.dll.
  11. * \file Opcode.h
  12. * \author Pierre Terdiman
  13. * \date March, 20, 2001
  14. */
  15. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  16. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  17. // Include Guard
  18. #ifndef __OPCODE_H__
  19. #define __OPCODE_H__
  20. // stddef.h and stdarg.h must be included before Opcode headers
  21. // as they latermay not compile being not able to find types in std::
  22. #include <stddef.h>
  23. #include <stdarg.h>
  24. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  25. // Things to help us compile on non-windows platforms
  26. #if defined(__APPLE__) || defined(__MACOSX__)
  27. #if __APPLE_CC__ < 1495
  28. #define sqrtf sqrt
  29. #define sinf sin
  30. #define cosf cos
  31. #define acosf acos
  32. #define asinf asin
  33. #endif
  34. #endif
  35. #ifndef _MSC_VER
  36. #ifndef __int64
  37. #define __int64 long long int
  38. #endif
  39. #ifndef __stdcall /* this is defined in MinGW and CygWin, so avoid the warning */
  40. #define __stdcall /* */
  41. #endif
  42. #endif
  43. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  44. // Compilation messages
  45. #ifdef _MSC_VER
  46. #if defined(OPCODE_EXPORTS)
  47. // #pragma message("Compiling OPCODE")
  48. #elif !defined(OPCODE_EXPORTS)
  49. // #pragma message("Using OPCODE")
  50. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  51. // Automatic linking
  52. #ifndef BAN_OPCODE_AUTOLINK
  53. #ifdef _DEBUG
  54. //#pragma comment(lib, "Opcode_D.lib")
  55. #else
  56. //#pragma comment(lib, "Opcode.lib")
  57. #endif
  58. #endif
  59. #endif
  60. #endif
  61. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  62. // Preprocessor
  63. #ifndef ICE_NO_DLL
  64. #ifdef OPCODE_EXPORTS
  65. #define OPCODE_API// __declspec(dllexport)
  66. #else
  67. #define OPCODE_API// __declspec(dllimport)
  68. #endif
  69. #else
  70. #define OPCODE_API
  71. #endif
  72. #include "OPC_Settings.h"
  73. #include "OPC_IceHook.h"
  74. namespace Opcode
  75. {
  76. // Bulk-of-the-work
  77. #include "OPC_Common.h"
  78. #include "OPC_MeshInterface.h"
  79. // Builders
  80. #include "OPC_TreeBuilders.h"
  81. // Trees
  82. #include "OPC_AABBTree.h"
  83. #include "OPC_OptimizedTree.h"
  84. // Models
  85. #include "OPC_BaseModel.h"
  86. #include "OPC_Model.h"
  87. #include "OPC_HybridModel.h"
  88. // Colliders
  89. #include "OPC_Collider.h"
  90. #include "OPC_VolumeCollider.h"
  91. #include "OPC_TreeCollider.h"
  92. #include "OPC_RayCollider.h"
  93. #include "OPC_SphereCollider.h"
  94. #include "OPC_OBBCollider.h"
  95. #include "OPC_AABBCollider.h"
  96. #include "OPC_LSSCollider.h"
  97. #include "OPC_PlanesCollider.h"
  98. // Usages
  99. #include "OPC_Picking.h"
  100. FUNCTION OPCODE_API bool InitOpcode();
  101. FUNCTION OPCODE_API bool CloseOpcode();
  102. }
  103. #endif // __OPCODE_H__