cm_public.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. #include "qfiles.h"
  19. void CM_LoadMap( const char *name, qboolean clientload, int *checksum);
  20. void CM_ClearMap( void );
  21. clipHandle_t CM_InlineModel( int index ); // 0 = world, 1 + are bmodels
  22. clipHandle_t CM_TempBoxModel( const vec3_t mins, const vec3_t maxs, int capsule );
  23. void CM_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs );
  24. int CM_NumClusters (void);
  25. int CM_NumInlineModels( void );
  26. char *CM_EntityString (void);
  27. // returns an ORed contents mask
  28. int CM_PointContents( const vec3_t p, clipHandle_t model );
  29. int CM_TransformedPointContents( const vec3_t p, clipHandle_t model, const vec3_t origin, const vec3_t angles );
  30. void CM_BoxTrace ( trace_t *results, const vec3_t start, const vec3_t end,
  31. vec3_t mins, vec3_t maxs,
  32. clipHandle_t model, int brushmask, int capsule );
  33. void CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const vec3_t end,
  34. vec3_t mins, vec3_t maxs,
  35. clipHandle_t model, int brushmask,
  36. const vec3_t origin, const vec3_t angles, int capsule );
  37. byte *CM_ClusterPVS (int cluster);
  38. int CM_PointLeafnum( const vec3_t p );
  39. // only returns non-solid leafs
  40. // overflow if return listsize and if *lastLeaf != list[listsize-1]
  41. int CM_BoxLeafnums( const vec3_t mins, const vec3_t maxs, int *list,
  42. int listsize, int *lastLeaf );
  43. int CM_LeafCluster (int leafnum);
  44. int CM_LeafArea (int leafnum);
  45. void CM_AdjustAreaPortalState( int area1, int area2, qboolean open );
  46. qboolean CM_AreasConnected( int area1, int area2 );
  47. int CM_WriteAreaBits( byte *buffer, int area );
  48. // cm_tag.c
  49. int CM_LerpTag( orientation_t *tag, clipHandle_t model, int startFrame, int endFrame,
  50. float frac, const char *tagName );
  51. // cm_marks.c
  52. int CM_MarkFragments( int numPoints, const vec3_t *points, const vec3_t projection,
  53. int maxPoints, vec3_t pointBuffer, int maxFragments, markFragment_t *fragmentBuffer );
  54. // cm_patch.c
  55. void CM_DrawDebugSurface( void (*drawPoly)(int color, int numPoints, float *points) );