1
0
Fork 0

Changes corresponding to API changes in libArray.a

This commit is contained in:
curt 2003-03-17 04:50:40 +00:00
parent 90152df81f
commit 06985ebabd
5 changed files with 10 additions and 8 deletions

View file

@ -85,7 +85,7 @@ static void calc_elevations( const string &root, Matrix_Point3Df &Pts ) {
bool found_file = false; bool found_file = false;
while ( !found_file && j < (int)elev_src.size() ) { while ( !found_file && j < (int)elev_src.size() ) {
string array_path = root + "/" + elev_src[j] + "/" + base string array_path = root + "/" + elev_src[j] + "/" + base
+ "/" + b.gen_index_str() + ".arr"; + "/" + b.gen_index_str();
if ( array.open(array_path) ) { if ( array.open(array_path) ) {
found_file = true; found_file = true;
cout << "Using array_path = " << array_path << endl; cout << "Using array_path = " << array_path << endl;

View file

@ -47,7 +47,6 @@
#include <simgear/math/sg_geodesy.hxx> #include <simgear/math/sg_geodesy.hxx>
#include <simgear/misc/texcoord.hxx> #include <simgear/misc/texcoord.hxx>
#include <Array/array.hxx>
#include <Geometry/poly_support.hxx> #include <Geometry/poly_support.hxx>
#include <Geometry/trinodes.hxx> #include <Geometry/trinodes.hxx>
#include <Output/output.hxx> #include <Output/output.hxx>

View file

@ -164,7 +164,8 @@ static int actual_load_polys( const string& dir,
ext = file.substr(pos + 1); ext = file.substr(pos + 1);
cout << file << " " << f_index << " '" << ext << "'" << endl; cout << file << " " << f_index << " '" << ext << "'" << endl;
full_path = dir + "/" + file; full_path = dir + "/" + file;
if ( (ext == "arr") || (ext == "arr.gz") ) { if ( (ext == "arr") || (ext == "arr.gz") ||
(ext == "fit") || (ext == "fit.gz")) {
// skip // skip
} else if (ext == "osgb36") { } else if (ext == "osgb36") {
cout << "Loading osgb36 poly definition file\n"; cout << "Loading osgb36 poly definition file\n";
@ -198,7 +199,8 @@ static int actual_load_polys( const string& dir,
ext = file.substr(pos + 1); ext = file.substr(pos + 1);
cout << file << " " << f_index << " '" << ext << "'" << endl; cout << file << " " << f_index << " '" << ext << "'" << endl;
full_path = dir + "/" + file; full_path = dir + "/" + file;
if ( (ext == "arr") || (ext == "arr.gz") || (ext == "ind") ) { if ( (ext == "arr") || (ext == "arr.gz") ||
(ext == "fit") || (ext == "fit.gz") || (ext == "ind") ) {
// skip // skip
} else if (ext == "osgb36") { } else if (ext == "osgb36") {
cout << "Loading osgb36 poly definition file\n"; cout << "Loading osgb36 poly definition file\n";
@ -419,7 +421,7 @@ static bool load_array( TGConstruct& c, TGArray& array) {
for ( i = 0; i < (int)load_dirs.size(); ++i ) { for ( i = 0; i < (int)load_dirs.size(); ++i ) {
string array_path = load_dirs[i] + "/" + base string array_path = load_dirs[i] + "/" + base
+ "/" + c.get_bucket().gen_index_str() + ".arr"; + "/" + c.get_bucket().gen_index_str();
cout << "array_path = " << array_path << endl; cout << "array_path = " << array_path << endl;
if ( array.open(array_path) ) { if ( array.open(array_path) ) {
@ -443,8 +445,8 @@ static void first_triangulate( TGConstruct& c, const TGArray& array,
// first we need to consolidate the points of the Array fit list and // first we need to consolidate the points of the Array fit list and
// all the polygons into a more "Triangle" friendly format // all the polygons into a more "Triangle" friendly format
point_list corner_list = array.get_corner_node_list(); point_list corner_list = array.get_corner_list();
point_list fit_list = array.get_fit_node_list(); point_list fit_list = array.get_fitted_list();
TGPolyList gpc_polys = c.get_clipped_polys(); TGPolyList gpc_polys = c.get_clipped_polys();
cout << "ready to build node list and polygons" << endl; cout << "ready to build node list and polygons" << endl;

View file

@ -100,7 +100,7 @@ int main(int argc, char **argv) {
cout << " start = " << startx << "," << starty << endl; cout << " start = " << startx << "," << starty << endl;
for ( int jj = 0; jj < array.get_rows(); jj++ ) { for ( int jj = 0; jj < array.get_rows(); jj++ ) {
for ( int ii = 0; ii < array.get_cols(); ii++ ) { for ( int ii = 0; ii < array.get_cols(); ii++ ) {
data[startx+ii][starty+jj] = array.get_point(ii, jj); data[startx+ii][starty+jj] = array.get_array_elev(ii, jj);
} }
} }
} }

View file

@ -1,4 +1,5 @@
SUBDIRS = \ SUBDIRS = \
ArrayFit \
DemChop \ DemChop \
DemInfo \ DemInfo \
DemRaw2ascii \ DemRaw2ascii \