1 /** 2 * @file 3 * @brief Common model code header (for bsp and others) 4 */ 5 6 /* 7 Copyright (C) 1997-2001 Id Software, Inc. 8 9 This program is free software; you can redistribute it and/or 10 modify it under the terms of the GNU General Public License 11 as published by the Free Software Foundation; either version 2 12 of the License, or (at your option) any later version. 13 14 This program is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 18 See the GNU General Public License for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with this program; if not, write to the Free Software 22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 24 */ 25 26 #pragma once 27 28 /*============================================================== 29 CMODEL 30 ==============================================================*/ 31 #include "tracing.h" 32 #include "qfiles.h" 33 34 void CM_LoadMap(const char* tiles, bool day, const char* pos, const char* entityString, mapData_t* mapData, mapTiles_t* mapTiles); 35 cBspModel_t* CM_InlineModel(const mapTiles_t* mapTiles, const char* name); 36 cBspModel_t* CM_SetInlineModelOrientation(mapTiles_t* mapTiles, const char* name, const vec3_t origin, const vec3_t angles); 37 void CM_GetInlineModelAABB(mapTiles_t* mapTiles, const char* name, AABB& aabb); 38 float CM_GetVisibility(const mapTiles_t* mapTiles, const pos3_t position); 39 void CM_LoadBsp(MapTile &tile, const dBspHeader_t& header, const vec3_t shift, const byte* base); 40 41 /*============================================================== 42 CMODEL BOX TRACING 43 ==============================================================*/ 44 45 /** creates a clipping hull for an arbitrary box */ 46 int32_t CM_HeadnodeForBox(MapTile &tile, const vec3_t mins, const vec3_t maxs); 47 trace_t CM_HintedTransformedBoxTrace(MapTile &tile, const vec3_t start, const vec3_t end, const AABB &traceBox, const int headnode, const int brushmask, const int brushrejects, const vec3_t origin, const vec3_t angles, const vec3_t rmaShift, const float fraction); 48 #define CM_TransformedBoxTrace(tile, start, end, box, headnode, brushmask, brushreject, origin, angles) CM_HintedTransformedBoxTrace(tile, start, end, box, headnode, brushmask, brushreject, origin, angles, vec3_origin, 1.0f); 49 trace_t CM_EntCompleteBoxTrace(mapTiles_t* mapTiles, const Line &traceLine, const AABB* traceBox, int levelmask, int brushmask, int brushreject, const char** list); 50 bool CM_EntTestLineDM(mapTiles_t* mapTiles, const vec3_t start, const vec3_t stop, vec3_t end, const int levelmask, const char** entlist); 51 bool CM_EntTestLine(mapTiles_t* mapTiles, const vec3_t start, const vec3_t stop, const int levelmask, const char** entlist); 52 trace_t CM_CompleteBoxTrace(mapTiles_t* mapTiles, const vec3_t start, const vec3_t end, const AABB &box, int levelmask, int brushmask, int brushreject); 53