Debian Codegraph @

editor/drawworld.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/Main/editor/drawworld.h $
21 * $Revision: 1.1.1.1 $
22 * $Date: 2003-08-26 03:57:37 $
23 * $Author: kevinb $
24 *
25 * Header for drawworld.cpp
26 *
27 * $Log: not supported by cvs2svn $
28 *
29 * 6 10/04/98 1:25p Matt
30 *
31 * 5 5/20/98 3:48p Matt
32 * Added suport for variable-depth face selection in wireframe view.
33 *
34 * 4 9/17/97 11:34a Matt
35 * Ripped out segment code
36 *
37 * 3 7/29/97 12:16p Matt
38 * Made wireframe seach work for rooms & faces
39 *
40 * 5 3/17/97 11:10a Jason
41 * added wireframe terrain view
42 *
43 * 4 2/28/97 4:00p Matt
44 * Added code to handle the list of selected segments
45 *
46 * 3 2/19/97 5:37p Matt
47 * Added code to set curseg from clicking in wireframe window
48 *
49 * 2 2/07/97 5:47p Matt
50 * Renamed vector.h to vecmat.h to fix DevStudio problem
51 *
52 * $NoKeywords: $
53 */
54
55 #include "gr.h"
56
57 #include "vecmat.h"
58
59 void DrawWorld(grViewport *vp, vector *view_target, matrix *view_orient, float view_dist, int start_room, float rad);
60 void DrawWorldRoom(grViewport *vp, vector *view_target, matrix *view_orient, float view_dist, int start_room,
61 int depth);
62
63 void DrawTerrainWorld(grViewport *vp, vector *view_target, matrix *view_orient, float view_dist);
64
65 // Find mode values
66 #define FM_CLOSEST 0 // Finds the closest face
67 #define FM_SPECIFIC 1 // Finds the passed face
68 #define FM_NEXT 2 // Find the next-farthest face from the last-found face
69
70 // Finds the closest room:face to the viewer at a given x,y screen position in the wireframe view
71 // Parameters: vp - the viewport we're checking. Must be the same viewport as the last wireframe view rendered
72 // x,y - the screen coordinates clicked on
73 // roomnum,facenum - pointers to variables to be filled in
74 // ingore_previous - if this is true, ignore the previous face & find the next
75 //farther face Returns: true if found a room/face
76 bool WireframeFindRoomFace(grViewport *vp, int x, int y, int *roomnum, int *facenum, int find_mode);
77
78 // Adds all the rooms that have a vertex inside of a given screen box to the selected list
79 // Parameters: vp - the viewport we're checking. Must be the same viewport as the last wireframe view rendered
80 // left,top,right,bot - the screen coordinates of the box
81 // Returns: the number of rooms found
82 int SelectRoomsInBox(grViewport *vp, int left, int top, int right, int bot);