IPluginEntities.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. //-----------------------------------------------------------------------------
  19. //
  20. // $LogFile$
  21. // $Revision: 1.1.1.4 $
  22. // $Author: ttimo $
  23. // $Date: 2000/01/18 00:17:12 $
  24. // $Log: IPluginEntities.h,v $
  25. // Revision 1.1.1.4 2000/01/18 00:17:12 ttimo
  26. // merging in for RC
  27. //
  28. // Revision 1.3 2000/01/17 23:53:42 TBesset
  29. // ready for merge in sourceforge (RC candidate)
  30. //
  31. // Revision 1.2 2000/01/07 16:40:10 TBesset
  32. // merged from BSP frontend
  33. //
  34. // Revision 1.1.1.3 1999/12/29 18:31:27 TBesset
  35. // Q3Radiant public version
  36. //
  37. // Revision 1.1.1.1.2.1 1999/12/29 21:39:35 TBesset
  38. // updated to update3 from Robert
  39. //
  40. // Revision 1.1.1.3 1999/12/29 18:31:27 TBesset
  41. // Q3Radiant public version
  42. // Revision 1.1.1.3 1999/12/29 18:31:27 TBesset
  43. // Q3Radiant public version
  44. //
  45. // Revision 1.2 1999/11/22 17:46:45 Timo & Christine
  46. // merged EARadiant into the main tree
  47. // bug fixes for Q3Plugin / EAPlugin
  48. // export for Robert
  49. //
  50. // Revision 1.1.2.1 1999/11/03 20:37:59 Timo & Christine
  51. // MEAN plugin for Q3Radiant, alpha version
  52. //
  53. //
  54. // DESCRIPTION:
  55. // _QERPluginEntitiesTable is used by plugins for various plugin entities commands
  56. // _QERPlugEntitiesFactory is a set of commands Radiant uses to instanciate plugin entities
  57. // next are basics for plugin entities ( interfaces )
  58. #ifndef __IPLUGINENTITIES_H_
  59. #define __IPLUGINENTITIES_H_
  60. // define a GUID for this interface so plugins can access and reference it
  61. // {9613F500-8C7C-11d3-8EF3-C9EB56B6B7BE}
  62. static const GUID QERPluginEntitiesTable_GUID =
  63. { 0x9613f500, 0x8c7c, 0x11d3, { 0x8e, 0xf3, 0xc9, 0xeb, 0x56, 0xb6, 0xb7, 0xbe } };
  64. typedef int (WINAPI* PFN_ECLASSSCANDIR) ( char*, HMODULE );
  65. struct _QERPluginEntitiesTable
  66. {
  67. int m_nSize;
  68. PFN_ECLASSSCANDIR m_pfnEClassScanDir;
  69. };
  70. // plugin entities
  71. class IPluginEntity
  72. {
  73. public:
  74. // Increment the number of references to this object
  75. virtual void IncRef () = 0;
  76. // Decrement the reference count
  77. virtual void DecRef () = 0;
  78. // getting bounds of the brush used to select/move the object
  79. virtual void GetBounds( vec3_t mins, vec3_t maxs ) = 0;
  80. // rendering the object in the camera view
  81. virtual void CamRender() = 0;
  82. };
  83. // {DBC6B300-8E4B-11d3-8EF3-BA5E57D56399}
  84. static const GUID QERPlugEntitiesFactory_GUID =
  85. { 0xdbc6b300, 0x8e4b, 0x11d3, { 0x8e, 0xf3, 0xba, 0x5e, 0x57, 0xd5, 0x63, 0x99 } };
  86. typedef IPluginEntity * (WINAPI* PFN_CREATEENTITY) ( eclass_t *, IEpair * );
  87. struct _QERPlugEntitiesFactory
  88. {
  89. int m_nSize;
  90. PFN_CREATEENTITY m_pfnCreateEntity;
  91. };
  92. #endif