Fixed to compile and install using an ANSI C++ compiler like G++ 3.3.
Some conditionals may be required to build with other compilers.
This commit is contained in:
parent
7cb4539e86
commit
631c9ab968
17 changed files with 88 additions and 15 deletions
5
src/Prep/Terra/.cvsignore
Normal file
5
src/Prep/Terra/.cvsignore
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
.deps
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
terra
|
||||||
|
xterra
|
|
@ -1,9 +1,14 @@
|
||||||
#include <iostream.h>
|
#include <assert.h>
|
||||||
|
#include <iostream>
|
||||||
#include "GreedyInsert.h"
|
#include "GreedyInsert.h"
|
||||||
|
|
||||||
#include "Mask.h"
|
#include "Mask.h"
|
||||||
extern ImportMask *MASK;
|
extern ImportMask *MASK;
|
||||||
|
|
||||||
|
using std::cerr;
|
||||||
|
using std::endl;
|
||||||
|
|
||||||
|
|
||||||
void TrackedTriangle::update(Subdivision& s)
|
void TrackedTriangle::update(Subdivision& s)
|
||||||
{
|
{
|
||||||
GreedySubdivision& gs = (GreedySubdivision&)s;
|
GreedySubdivision& gs = (GreedySubdivision&)s;
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <iostream.h>
|
#include <iostream>
|
||||||
#include "Heap.h"
|
#include "Heap.h"
|
||||||
|
|
||||||
|
using std::cerr;
|
||||||
|
using std::endl;
|
||||||
|
|
||||||
|
|
||||||
void Heap::swap(int i,int j)
|
void Heap::swap(int i,int j)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,21 @@
|
||||||
EXTRA_DIST = \
|
AM_CXXFLAGS = -DIOSTREAMH
|
||||||
|
|
||||||
|
bin_PROGRAMS = terra xterra
|
||||||
|
|
||||||
|
terra_SOURCES = \
|
||||||
Array.h Geom.h GreedyInsert.cc GreedyInsert.h Heap.cc Heap.h \
|
Array.h Geom.h GreedyInsert.cc GreedyInsert.h Heap.cc Heap.h \
|
||||||
Makefile-gcc-2.95 Makefile.am Makefile.orig Map.cc Map.h Mask.cc \
|
Makefile-gcc-2.95 Makefile.am Makefile.orig Map.cc Map.h Mask.cc \
|
||||||
Mask.h Quadedge.cc Quadedge.h Subdivision.cc Subdivision.h Vec2.h \
|
Mask.h Quadedge.cc Quadedge.h Subdivision.cc Subdivision.h Vec2.h \
|
||||||
Vec3.h cmdline.cc glHacks.cc glHacks.h greedy.cc gui.cc gui.h \
|
Vec3.h cmdline.cc glHacks.cc glHacks.h greedy.cc gui.cc gui.h \
|
||||||
output.cc terra.cc terra.h version.h xterra.cc
|
output.cc terra.cc terra.h version.h
|
||||||
|
|
||||||
|
terra_LDADD = -lGL -lGLU -lglut
|
||||||
|
|
||||||
|
xterra_SOURCES = \
|
||||||
|
Array.h Geom.h GreedyInsert.cc GreedyInsert.h Heap.cc Heap.h \
|
||||||
|
Makefile-gcc-2.95 Makefile.am Makefile.orig Map.cc Map.h Mask.cc \
|
||||||
|
Mask.h Quadedge.cc Quadedge.h Subdivision.cc Subdivision.h Vec2.h \
|
||||||
|
Vec3.h cmdline.cc glHacks.cc glHacks.h greedy.cc gui.cc gui.h \
|
||||||
|
output.cc terra.h version.h xterra.cc
|
||||||
|
|
||||||
|
xterra_LDADD = -lGL -lGLU -lglut
|
|
@ -3,6 +3,9 @@
|
||||||
#include "Geom.h"
|
#include "Geom.h"
|
||||||
#include "Map.h"
|
#include "Map.h"
|
||||||
|
|
||||||
|
using std::cerr;
|
||||||
|
using std::endl;
|
||||||
|
|
||||||
void Map::findLimits()
|
void Map::findLimits()
|
||||||
{
|
{
|
||||||
min = HUGE;
|
min = HUGE;
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
#define MAP_INCLUDED
|
#define MAP_INCLUDED
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <iostream.h>
|
#include <iostream>
|
||||||
|
|
||||||
|
using std::istream;
|
||||||
|
|
||||||
#include "Geom.h"
|
#include "Geom.h"
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <iostream.h>
|
#include <iostream>
|
||||||
|
|
||||||
#include "Geom.h"
|
#include "Geom.h"
|
||||||
#include "Mask.h"
|
#include "Mask.h"
|
||||||
|
|
||||||
|
using std::cerr;
|
||||||
|
using std::endl;
|
||||||
|
|
||||||
|
|
||||||
RealMask *readMask(istream& in)
|
RealMask *readMask(istream& in)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#ifndef MASK_INCLUDED // -*- C++ -*-
|
#ifndef MASK_INCLUDED // -*- C++ -*-
|
||||||
#define MASK_INCLUDED
|
#define MASK_INCLUDED
|
||||||
|
|
||||||
|
#include <istream>
|
||||||
|
|
||||||
|
using std::istream;
|
||||||
|
|
||||||
class ImportMask
|
class ImportMask
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <iostream.h>
|
#include <iostream>
|
||||||
|
|
||||||
#include "Quadedge.h"
|
#include "Quadedge.h"
|
||||||
|
|
||||||
|
using std::cerr;
|
||||||
|
using std::endl;
|
||||||
|
|
||||||
Edge::Edge(const Edge&)
|
Edge::Edge(const Edge&)
|
||||||
{
|
{
|
||||||
cerr << "Edge: Edge assignments are forbidden." << endl;
|
cerr << "Edge: Edge assignments are forbidden." << endl;
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <iostream.h>
|
#include <iostream>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "Geom.h"
|
||||||
#include "Subdivision.h"
|
#include "Subdivision.h"
|
||||||
|
|
||||||
|
using std::cerr;
|
||||||
|
using std::endl;
|
||||||
|
|
||||||
|
|
||||||
Edge *Subdivision::makeEdge(Vec2& org, Vec2& dest)
|
Edge *Subdivision::makeEdge(Vec2& org, Vec2& dest)
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
using std::ostream;
|
||||||
|
using std::istream;
|
||||||
|
|
||||||
class Vec2 {
|
class Vec2 {
|
||||||
protected:
|
protected:
|
||||||
real elt[2];
|
real elt[2];
|
||||||
|
@ -165,7 +168,8 @@ inline ostream& operator<<(ostream& out, const Vec2& v)
|
||||||
|
|
||||||
inline istream& operator>>(istream& in, Vec2& v)
|
inline istream& operator>>(istream& in, Vec2& v)
|
||||||
{
|
{
|
||||||
return in >> "[" >> v[0] >> v[1] >> "]";
|
char c;
|
||||||
|
return in >> c >> v[0] >> v[1] >> c;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,8 @@ inline ostream& operator<<(ostream& out, const Vec3& v)
|
||||||
|
|
||||||
inline istream& operator>>(istream& in, Vec3& v)
|
inline istream& operator>>(istream& in, Vec3& v)
|
||||||
{
|
{
|
||||||
return in >> "[" >> v[0] >> v[1] >> v[2] >> "]";
|
char c;
|
||||||
|
return in >> c >> v[0] >> v[1] >> v[2] >> c;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <fstream.h>
|
#include <fstream>
|
||||||
#include <string.h>
|
#include <string>
|
||||||
#include "terra.h"
|
#include "terra.h"
|
||||||
|
|
||||||
|
using std::ifstream;
|
||||||
|
using std::cin;
|
||||||
|
using std::cerr;
|
||||||
|
using std::endl;
|
||||||
|
|
||||||
GreedySubdivision *mesh;
|
GreedySubdivision *mesh;
|
||||||
Map *DEM;
|
Map *DEM;
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glu.h>
|
#include <GL/glu.h>
|
||||||
|
|
||||||
|
using std::ostream;
|
||||||
|
using std::endl;
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#include "terra.h"
|
#include "terra.h"
|
||||||
|
|
||||||
|
using std::cerr;
|
||||||
|
using std::endl;
|
||||||
|
|
||||||
void scripted_preinsertion(istream& script)
|
void scripted_preinsertion(istream& script)
|
||||||
{
|
{
|
||||||
char op[4];
|
char op[4];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include <iostream.h>
|
#include <iostream>
|
||||||
#include <fstream.h>
|
#include <fstream>
|
||||||
|
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include "glHacks.h"
|
#include "glHacks.h"
|
||||||
|
@ -7,6 +7,9 @@
|
||||||
#include "terra.h"
|
#include "terra.h"
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
|
|
||||||
|
using std::cout;
|
||||||
|
using std::endl;
|
||||||
|
|
||||||
|
|
||||||
int mesh_view;
|
int mesh_view;
|
||||||
int surf_view;
|
int surf_view;
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
#include "terra.h"
|
#include "terra.h"
|
||||||
#include <fstream.h>
|
#include <fstream>
|
||||||
|
|
||||||
|
using std::cerr;
|
||||||
|
using std::cout;
|
||||||
|
using std::endl;
|
||||||
|
using std::istream;
|
||||||
|
using std::ostream;
|
||||||
|
using std::ofstream;
|
||||||
|
using std::streampos;
|
||||||
|
|
||||||
|
|
||||||
void generate_output(char *filename, FileFormat format)
|
void generate_output(char *filename, FileFormat format)
|
||||||
|
|
Loading…
Reference in a new issue