1 | /* cvrotimg.h |
---|
2 | * Header file for |
---|
3 | * Reads a .3d image file into two linked lists of blocks, suitable for use |
---|
4 | * by caverot.c |
---|
5 | * Copyright (C) 1994-2001 Olly Betts |
---|
6 | * |
---|
7 | * This program is free software; you can redistribute it and/or modify |
---|
8 | * it under the terms of the GNU General Public License as published by |
---|
9 | * the Free Software Foundation; either version 2 of the License, or |
---|
10 | * (at your option) any later version. |
---|
11 | * |
---|
12 | * This program is distributed in the hope that it will be useful, |
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | * GNU General Public License for more details. |
---|
16 | * |
---|
17 | * You should have received a copy of the GNU General Public License |
---|
18 | * along with this program; if not, write to the Free Software |
---|
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
20 | */ |
---|
21 | |
---|
22 | #ifndef SVX_CVROTIMG_H_INCLUDED |
---|
23 | #define SVX_CVROTIMG_H_INCLUDED |
---|
24 | |
---|
25 | /* data type used after data is read in */ |
---|
26 | typedef int32_t coord; |
---|
27 | |
---|
28 | /* Data structures */ |
---|
29 | typedef struct { |
---|
30 | union { |
---|
31 | coord action; /* plot option for this point - draw/move/endofdata */ |
---|
32 | char *str; /* string for a label */ |
---|
33 | } _; |
---|
34 | coord X, Y, Z; /* coordinates */ |
---|
35 | } point; |
---|
36 | |
---|
37 | void set_codes(coord move_, coord draw_, coord stop_); |
---|
38 | |
---|
39 | bool load_data(const char *fnmData, const char *survey, |
---|
40 | point Huge **ppLegs, point Huge **ppSLegs, point Huge **ppStns); |
---|
41 | |
---|
42 | void reset_limits(point *pmin, point *pmax); |
---|
43 | |
---|
44 | void update_limits(point *pmin, point *pmax, |
---|
45 | point Huge *pLegs, point Huge *pStns); |
---|
46 | |
---|
47 | double scale_to_screen(const point *pmin, const point *pmax, |
---|
48 | int xcMac, int ycMac, double y_stretch); |
---|
49 | |
---|
50 | extern coord Xorg, Yorg, Zorg; /* position of centre of survey */ |
---|
51 | extern coord Xrad, Yrad, Zrad; /* "radii" */ |
---|
52 | |
---|
53 | #endif |
---|