diff -u ../terra.orig/Array.h ./Array.h
old
|
new
|
|
1 | 1 | #ifndef ARRAY_INCLUDED // -*- C++ -*- |
2 | 2 | #define ARRAY_INCLUDED |
3 | 3 | |
| 4 | #include <memory.h> |
| 5 | |
| 6 | |
4 | 7 | // |
5 | 8 | // Array classes |
6 | 9 | // |
diff -u ../terra.orig/GreedyInsert.cc ./GreedyInsert.cc
old
|
new
|
|
1 | | #include <iostream.h> |
| 1 | #include <iostream> |
2 | 2 | #include "GreedyInsert.h" |
3 | | |
| 3 | #include <assert.h> |
4 | 4 | #include "Mask.h" |
5 | 5 | extern ImportMask *MASK; |
6 | 6 | |
| 7 | using namespace std; |
| 8 | |
7 | 9 | void TrackedTriangle::update(Subdivision& s) |
8 | 10 | { |
9 | 11 | GreedySubdivision& gs = (GreedySubdivision&)s; |
… |
… |
|
209 | 211 | |
210 | 212 | is_used(sx,sy) = DATA_POINT_USED; |
211 | 213 | count++; |
| 214 | #if 0 |
212 | 215 | return insert(Vec2(sx,sy), t); |
| 216 | #endif |
| 217 | Vec2 vec(sx,sy); |
| 218 | return insert(vec, t); |
213 | 219 | } |
214 | 220 | |
215 | 221 | |
Only in .: GreedyInsert.o
diff -u ../terra.orig/Heap.cc ./Heap.cc
old
|
new
|
|
1 | 1 | #include <assert.h> |
2 | | #include <iostream.h> |
| 2 | #include <iostream> |
3 | 3 | #include "Heap.h" |
4 | 4 | |
| 5 | using namespace std; |
| 6 | |
5 | 7 | |
6 | 8 | void Heap::swap(int i,int j) |
7 | 9 | { |
Only in .: Heap.o
diff -u ../terra.orig/Makefile ./Makefile
old
|
new
|
|
4 | 4 | # You should change these to fit your system. |
5 | 5 | # |
6 | 6 | |
7 | | CC = cc |
8 | | C++ = CC |
| 7 | CC = gcc |
| 8 | C++ = g++ |
9 | 9 | |
10 | 10 | # For compiling on SGI's with the pre-5.3 (ie. cfront-based) compiler: |
11 | 11 | # add '-ptr/tmp/terra_ptrepository' to OPTFLAGS |
12 | 12 | # add '-pte.cc' to LFLAGS |
13 | 13 | |
14 | | OPTFLAGS = -g -mips2 |
| 14 | # OPTFLAGS = -g -mips2 |
15 | 15 | # OPTFLAGS = -O2 -mips2 |
| 16 | OPTFLAGS = -g -Wall |
16 | 17 | |
17 | 18 | GUI_LIBS = -lglut -lGLU -lGL -lXmu -lX11 |
18 | | LIBS = -lmalloc -lmx |
| 19 | LIBS = # -lmalloc -lmx |
19 | 20 | |
20 | 21 | # |
21 | 22 | # This defines the location of the GLUT libraries |
22 | 23 | # |
23 | | ANIM = /afs/cs/project/anim/garland |
| 24 | ANIM = /opt/local |
24 | 25 | GLUT_FLAGS = |
25 | 26 | GLUT_INCDIR = $(ANIM)/include |
26 | 27 | GLUT_LIBDIR = $(ANIM)/lib |
… |
… |
|
34 | 35 | # |
35 | 36 | # These are the flags for compilation (CFLAGS) and linking (LFLAGS) |
36 | 37 | # |
37 | | CFLAGS = $(INCDIR) $(OPTFLAGS) -DSAFETY |
| 38 | CFLAGS = $(INCDIR) $(OPTFLAGS) -DIOSTREAMH # -DSAFETY |
38 | 39 | LFLAGS = $(LIBDIR) $(OPTFLAGS) |
39 | 40 | |
40 | 41 | |
… |
… |
|
81 | 82 | |
82 | 83 | depend : |
83 | 84 | touch Makefile.depend |
84 | | makedepend -fMakefile.depend $(INCDIR) -I/usr/include/CC $(BASE_SRCS) $(GUI_SRCS) |
| 85 | makedepend -fMakefile.depend $(INCDIR) $(BASE_SRCS) $(GUI_SRCS) |
85 | 86 | /bin/rm -f Makefile.depend.bak |
86 | 87 | |
87 | 88 | sinclude Makefile.depend |
diff -u ../terra.orig/Map.h ./Map.h
old
|
new
|
|
2 | 2 | #define MAP_INCLUDED |
3 | 3 | |
4 | 4 | #include <stdlib.h> |
5 | | #include <iostream.h> |
| 5 | #include <iostream> |
6 | 6 | |
7 | 7 | #include "Geom.h" |
8 | 8 | |
| 9 | using namespace std; |
| 10 | |
| 11 | |
9 | 12 | class Map |
10 | 13 | { |
11 | 14 | public: |
Only in .: Map.o
diff -u ../terra.orig/Mask.cc ./Mask.cc
old
|
new
|
|
1 | 1 | #include <math.h> |
2 | 2 | #include <stdlib.h> |
3 | | #include <iostream.h> |
| 3 | #include <iostream> |
4 | 4 | |
5 | 5 | #include "Geom.h" |
6 | 6 | #include "Mask.h" |
7 | 7 | |
| 8 | using namespace std; |
| 9 | |
8 | 10 | |
9 | 11 | RealMask *readMask(istream& in) |
10 | 12 | { |
diff -u ../terra.orig/Mask.h ./Mask.h
old
|
new
|
|
1 | 1 | #ifndef MASK_INCLUDED // -*- C++ -*- |
2 | 2 | #define MASK_INCLUDED |
3 | 3 | |
| 4 | #include <istream> |
| 5 | |
| 6 | using namespace std; |
| 7 | |
| 8 | |
4 | 9 | class ImportMask |
5 | 10 | { |
6 | 11 | |
Only in .: Mask.o
diff -u ../terra.orig/Quadedge.cc ./Quadedge.cc
old
|
new
|
|
1 | 1 | #include <stdlib.h> |
2 | | #include <iostream.h> |
| 2 | #include <iostream> |
3 | 3 | |
4 | 4 | #include "Quadedge.h" |
5 | 5 | |
| 6 | using namespace std; |
| 7 | |
6 | 8 | Edge::Edge(const Edge&) |
7 | 9 | { |
8 | 10 | cerr << "Edge: Edge assignments are forbidden." << endl; |
Only in .: Quadedge.o
diff -u ../terra.orig/Subdivision.cc ./Subdivision.cc
old
|
new
|
|
1 | 1 | #include <stdlib.h> |
2 | | #include <iostream.h> |
| 2 | #include <iostream> |
3 | 3 | #include <assert.h> |
4 | 4 | |
5 | 5 | #include "Subdivision.h" |
6 | 6 | |
| 7 | using namespace std; |
7 | 8 | |
8 | 9 | |
9 | 10 | Edge *Subdivision::makeEdge(Vec2& org, Vec2& dest) |
… |
… |
|
105 | 106 | |
106 | 107 | static void overEdge(Edge *e, edge_callback fn, void *closure) |
107 | 108 | { |
108 | | if( e->token != timestamp ) |
| 109 | if( static_cast<typeof(timestamp)>(e->token) != timestamp ) |
109 | 110 | { |
110 | 111 | e->token = timestamp; |
111 | 112 | e->Sym()->token = timestamp; |
… |
… |
|
214 | 215 | real td = triArea(x, ed->Dest(), ed->Org()); |
215 | 216 | |
216 | 217 | if (td>0) // x is below ed |
217 | | if (to>0 || to==0 && t==0) {// x is interior, or origin endpoint |
| 218 | if (to>0 || (to==0 && t==0)) {// x is interior, or origin endpoint |
218 | 219 | startingEdge = e; |
219 | 220 | return e; |
220 | 221 | } |
… |
… |
|
259 | 260 | |
260 | 261 | if ( (x == e->Org()) || (x == e->Dest()) ) { |
261 | 262 | // point is already in the mesh |
| 263 | #if 0 |
262 | 264 | // |
263 | 265 | cerr << "WARNING: Tried to reinsert point: " << x << endl; |
264 | 266 | cerr << " org: " << e->Org() << endl; |
265 | 267 | cerr << " dest: " << e->Dest() << endl; |
| 268 | #endif |
266 | 269 | return NULL; |
267 | 270 | } |
268 | 271 | |
… |
… |
|
338 | 341 | do { |
339 | 342 | |
340 | 343 | Edge *e = spoke->Lnext(); |
| 344 | #if 0 |
341 | 345 | Edge *t = e->Oprev(); |
| 346 | #endif |
342 | 347 | |
343 | 348 | if( isInterior(e) && shouldSwap(x, e) ) |
344 | 349 | swap(e); |
Only in .: Subdivision.o
diff -u ../terra.orig/Vec2.h ./Vec2.h
old
|
new
|
|
1 | 1 | #ifndef VEC2_INCLUDED // -*- C++ -*- |
2 | 2 | #define VEC2_INCLUDED |
3 | 3 | |
| 4 | #include <iostream> |
| 5 | |
| 6 | using namespace std; |
| 7 | |
| 8 | |
4 | 9 | class Vec2 { |
5 | 10 | protected: |
6 | 11 | real elt[2]; |
… |
… |
|
163 | 168 | |
164 | 169 | inline istream& operator>>(istream& in, Vec2& v) |
165 | 170 | { |
| 171 | #if 0 |
166 | 172 | return in >> "[" >> v[0] >> v[1] >> "]"; |
| 173 | #endif |
| 174 | in.ignore(1, '['); |
| 175 | in >> v[0] >> v[1]; |
| 176 | in.ignore(1, ']'); |
| 177 | return in; |
167 | 178 | } |
168 | 179 | #endif |
169 | 180 | |
diff -u ../terra.orig/Vec3.h ./Vec3.h
old
|
new
|
|
1 | 1 | #ifndef VEC3_INCLUDED // -*- C++ -*- |
2 | 2 | #define VEC3_INCLUDED |
3 | 3 | |
| 4 | #include <iostream> |
| 5 | |
| 6 | using namespace std; |
| 7 | |
| 8 | |
4 | 9 | class Vec3 { |
5 | 10 | protected: |
6 | 11 | real elt[3]; |
… |
… |
|
173 | 178 | |
174 | 179 | inline istream& operator>>(istream& in, Vec3& v) |
175 | 180 | { |
| 181 | #if 0 |
176 | 182 | return in >> "[" >> v[0] >> v[1] >> v[2] >> "]"; |
| 183 | #endif |
| 184 | in.ignore(1, '['); |
| 185 | in >> v[0] >> v[1]; |
| 186 | in.ignore(1, ']'); |
| 187 | return in; |
177 | 188 | } |
178 | 189 | #endif |
179 | 190 | |
Only in .: altadena-lake.osm
Only in .: altadena.osm
diff -u ../terra.orig/cmdline.cc ./cmdline.cc
old
|
new
|
|
1 | 1 | #include <stdlib.h> |
2 | | #include <fstream.h> |
| 2 | #include <fstream> |
3 | 3 | #include <string.h> |
4 | 4 | #include "terra.h" |
| 5 | #include <getopt.h> |
| 6 | |
5 | 7 | |
6 | 8 | GreedySubdivision *mesh; |
7 | 9 | Map *DEM; |
… |
… |
|
18 | 20 | char *mask_filename = NULL; |
19 | 21 | char *script_filename = NULL; |
20 | 22 | |
21 | | static char *options = "e:p:h:o:m:s:"; |
| 23 | static const char *options = "e:p:h:o:m:s:"; |
22 | 24 | |
23 | | static char *usage_string = |
| 25 | static const char *usage_string = |
24 | 26 | "-e <thresh> Sets the tolerable error threshold\n" |
25 | 27 | "-p <count> Sets the maximum number of allowable points\n" |
26 | 28 | "-h <factor> Sets the height scaling factor. For example,\n" |
… |
… |
|
31 | 33 | "-s <file> Execute preinsertion script from <file>\n" |
32 | 34 | "\n"; |
33 | 35 | |
34 | | static void usage_error(char *msg = NULL) |
| 36 | static void usage_error(const char *msg = NULL) |
35 | 37 | { |
36 | 38 | if( msg ) |
37 | 39 | cerr << msg << endl; |
Only in .: cmdline.o
diff -u ../terra.orig/glHacks.h ./glHacks.h
old
|
new
|
|
4 | 4 | #include <GL/glx.h> |
5 | 5 | #include <GL/gl.h> |
6 | 6 | #include <GL/glu.h> |
| 7 | #include <iostream> |
| 8 | |
| 9 | using namespace std; |
7 | 10 | |
8 | 11 | |
9 | 12 | /************************************************************************* |
Only in .: glHacks.o
diff -u ../terra.orig/greedy.cc ./greedy.cc
old
|
new
|
|
1 | 1 | #include "terra.h" |
| 2 | #include <fstream> |
| 3 | |
2 | 4 | |
3 | 5 | void scripted_preinsertion(istream& script) |
4 | 6 | { |
… |
… |
|
64 | 66 | inline int goal_not_met() |
65 | 67 | { |
66 | 68 | return mesh->maxError() > error_threshold && |
67 | | mesh->pointCount() < point_limit; |
| 69 | static_cast<typeof(point_limit)>(mesh->pointCount()) < point_limit; |
68 | 70 | } |
69 | 71 | |
70 | 72 | static void announce_goal() |
diff -u ../terra.orig/output.cc ./output.cc
old
|
new
|
|
1 | 1 | #include "terra.h" |
2 | | #include <fstream.h> |
| 2 | #include <fstream> |
3 | 3 | |
4 | 4 | |
5 | | void generate_output(char *filename, FileFormat format) |
| 5 | void generate_output(const char *filename, FileFormat format) |
6 | 6 | { |
7 | 7 | if( !filename ) |
8 | 8 | filename = output_filename; |
Only in .: output.o
Only in .: terra
diff -u ../terra.orig/terra.cc ./terra.cc
old
|
new
|
|
1 | 1 | #include "terra.h" |
2 | 2 | |
3 | | main(int argc, char **argv) |
| 3 | int main(int argc, char **argv) |
4 | 4 | { |
5 | 5 | process_cmdline(argc, argv); |
6 | 6 | |
7 | 7 | greedy_insertion(); |
8 | 8 | |
9 | 9 | generate_output(); |
| 10 | |
| 11 | return 0; |
10 | 12 | } |
diff -u ../terra.orig/terra.h ./terra.h
old
|
new
|
|
24 | 24 | extern void scripted_preinsertion(istream&); |
25 | 25 | extern void subsample_insertion(int target_width); |
26 | 26 | |
27 | | extern void generate_output(char *filename=NULL, |
| 27 | extern void generate_output(const char *filename=NULL, |
28 | 28 | FileFormat format=NULLfile); |
29 | 29 | extern void output_tin(ostream&); |
30 | 30 | extern void output_eps(ostream&); |
Only in .: terra.o
Only in .: xterra
diff -u ../terra.orig/xterra.cc ./xterra.cc
old
|
new
|
|
5 | 5 | |
6 | 6 | |
7 | 7 | |
8 | | main(int argc, char **argv) |
| 8 | int main(int argc, char **argv) |
9 | 9 | { |
10 | 10 | glutInit(&argc, argv); |
11 | 11 | process_cmdline(argc, argv); |
… |
… |
|
15 | 15 | |
16 | 16 | |
17 | 17 | gui_interact(); |
| 18 | |
| 19 | return 0; |
18 | 20 | } |