ISelectedFace.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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.2.1 $
  22. // $Author: ttimo $
  23. // $Date: 2000/02/10 03:00:20 $
  24. // $Log: ISelectedFace.h,v $
  25. // Revision 1.1.1.4.2.1 2000/02/10 03:00:20 ttimo
  26. // adding IShaders.h
  27. //
  28. // Revision 1.1.1.4 2000/01/18 00:17:12 ttimo
  29. // merging in for RC
  30. //
  31. // Revision 1.3 2000/01/17 23:53:42 TBesset
  32. // ready for merge in sourceforge (RC candidate)
  33. //
  34. // Revision 1.2 2000/01/07 16:40:10 TBesset
  35. // merged from BSP frontend
  36. //
  37. // Revision 1.1.1.3 1999/12/29 18:31:27 TBesset
  38. // Q3Radiant public version
  39. //
  40. // Revision 1.1.1.1.2.1 1999/12/29 21:39:35 TBesset
  41. // updated to update3 from Robert
  42. //
  43. // Revision 1.1.1.3 1999/12/29 18:31:27 TBesset
  44. // Q3Radiant public version
  45. // Revision 1.1.1.3 1999/12/29 18:31:27 TBesset
  46. // Q3Radiant public version
  47. //
  48. // Revision 1.2 1999/11/22 17:46:45 Timo & Christine
  49. // merged EARadiant into the main tree
  50. // bug fixes for Q3Plugin / EAPlugin
  51. // export for Robert
  52. //
  53. // Revision 1.1.4.3 1999/11/15 22:39:40 Timo & Christine
  54. // bug fixing / additional features after update 173 from Robert
  55. //
  56. // Revision 1.1.4.2 1999/11/14 16:26:10 Timo & Christine
  57. // first beta of the ritualmap surface plugin
  58. //
  59. // Revision 1.1.4.1 1999/11/03 20:37:59 Timo & Christine
  60. // MEAN plugin for Q3Radiant, alpha version
  61. //
  62. // Revision 1.1.2.1 1999/10/27 08:34:26 Timo & Christine
  63. // preview version of the texture tools plugin is ready
  64. // ( TexTool.dll plugin is in Q3Plugin module )
  65. // plugins can draw in their own window using Radiant's qgl bindings
  66. //
  67. //
  68. // DESCRIPTION:
  69. // Quick interface hack for selected face interface
  70. // this one really needs more work, but I'm in a hurry with TexTool
  71. #ifndef __ISELECTEDFACE_H_
  72. #define __ISELECTEDFACE_H_
  73. // define a GUID for this interface so plugins can access and reference it
  74. // {5416A2A0-8633-11d3-8EF3-88B61F3A3B12}
  75. static const GUID QERSelectedFaceTable_GUID =
  76. { 0x5416a2a0, 0x8633, 0x11d3, { 0x8e, 0xf3, 0x88, 0xb6, 0x1f, 0x3a, 0x3b, 0x12 } };
  77. //++timo TODO: this interface needs some cleanup with the new texture / shaders interface
  78. // retrieve the texture number to bind to
  79. typedef int (WINAPI* PFN_GETTEXTURENUMBER) ();
  80. // winding_t is assumed to have MAX_POINTS_ON_WINDING allocated
  81. typedef int (WINAPI* PFN_GETFACEINFO) (_QERFaceData*, winding_t* );
  82. // tell editor to update the selected face data
  83. typedef int (WINAPI* PFN_SETFACEINFO) (_QERFaceData*);
  84. // retrieving some texture information
  85. typedef void (WINAPI* PFN_GETTEXTURESIZE) ( int Size[2] );
  86. // loading the qtexture_t from the texture name
  87. typedef qtexture_t* (WINAPI* PFN_TEXTUREFORNAME) ( const char *name );
  88. // straight func pointer to Select_SetTexture
  89. // last parameter must be casted to an IPluginTexdef
  90. typedef void (WINAPI* PFN_SELECT_SETTEXTURE) (texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale, void* pPlugTexdef );
  91. // NOTE: some things in there are not really related to the selected face
  92. // having some stuff moved into a textures-dedicated part ?
  93. struct _QERSelectedFaceTable
  94. {
  95. int m_nSize;
  96. PFN_GETTEXTURENUMBER m_pfnGetTextureNumber;
  97. PFN_GETFACEINFO m_pfnGetFaceInfo;
  98. PFN_SETFACEINFO m_pfnSetFaceInfo;
  99. PFN_GETTEXTURESIZE m_pfnGetTextureSize;
  100. PFN_TEXTUREFORNAME m_pfnTextureForName;
  101. PFN_SELECT_SETTEXTURE m_pfnSelect_SetTexture;
  102. };
  103. #endif