1
0
Fork 0

Refinements in naming and organization.

This commit is contained in:
curt 1999-03-23 22:02:51 +00:00
parent 427762b074
commit e774a38dc7
7 changed files with 46 additions and 23 deletions

View file

@ -208,11 +208,11 @@ int FGTriangle::run_triangulate() {
int counter;
// point list
trinode_list node_list = in_nodes.get_node_list();
point_list node_list = in_nodes.get_node_list();
in.numberofpoints = node_list.size();
in.pointlist = (REAL *) malloc(in.numberofpoints * 2 * sizeof(REAL));
trinode_list_iterator tn_current, tn_last;
point_list_iterator tn_current, tn_last;
tn_current = node_list.begin();
tn_last = node_list.end();
counter = 0;
@ -371,6 +371,9 @@ int FGTriangle::run_triangulate() {
// $Log$
// Revision 1.11 1999/03/23 22:02:51 curt
// Refinements in naming and organization.
//
// Revision 1.10 1999/03/22 23:49:02 curt
// Modifications to facilitate conversion to output format.
//

View file

@ -33,8 +33,6 @@
#include <Include/compiler.h>
#include <vector>
#include <Array/array.hxx>
#include <Clipper/clipper.hxx>
#include <Math/point3d.hxx>
@ -50,17 +48,6 @@ extern "C" {
#include "tripoly.hxx"
#include "trisegs.hxx"
FG_USING_STD(vector);
typedef vector < FGTriPoly > tripoly_list;
typedef tripoly_list::iterator tripoly_list_iterator;
typedef tripoly_list::const_iterator const_tripoly_list_iterator;
typedef vector < FGTriEle > triele_list;
typedef triele_list::iterator triele_list_iterator;
typedef triele_list::const_iterator const_triele_list_iterator;
class FGTriangle {
@ -95,6 +82,7 @@ public:
int run_triangulate();
inline FGTriNodes get_out_nodes() const { return out_nodes; }
inline triele_list get_elelist() const { return elelist; }
};
@ -102,6 +90,9 @@ public:
// $Log$
// Revision 1.8 1999/03/23 22:02:52 curt
// Refinements in naming and organization.
//
// Revision 1.7 1999/03/22 23:49:03 curt
// Modifications to facilitate conversion to output format.
//

View file

@ -33,6 +33,10 @@
#include <Include/compiler.h>
#include <vector>
FG_USING_STD(vector);
// a segment is two integer pointers into the node list
class FGTriEle {
@ -55,10 +59,18 @@ public:
};
typedef vector < FGTriEle > triele_list;
typedef triele_list::iterator triele_list_iterator;
typedef triele_list::const_iterator const_triele_list_iterator;
#endif // _TRIELES_HXX
// $Log$
// Revision 1.2 1999/03/23 22:02:53 curt
// Refinements in naming and organization.
//
// Revision 1.1 1999/03/22 23:58:57 curt
// Initial revision.
//

View file

@ -50,7 +50,7 @@ inline bool FGTriNodes::close_enough( const Point3D& p1, const Point3D& p2 ) {
// Add a point to the point list if it doesn't already exist. Returns
// the index (starting at zero) of the point in the list.
int FGTriNodes::unique_add( const Point3D& p ) {
trinode_list_iterator current, last;
point_list_iterator current, last;
int counter = 0;
// cout << p.x() << "," << p.y() << endl;
@ -83,6 +83,9 @@ int FGTriNodes::simple_add( const Point3D& p ) {
// $Log$
// Revision 1.5 1999/03/23 22:02:54 curt
// Refinements in naming and organization.
//
// Revision 1.4 1999/03/22 23:49:04 curt
// Modifications to facilitate conversion to output format.
//

View file

@ -43,16 +43,16 @@ FG_USING_STD(vector);
#define FG_PROXIMITY_EPSILON 0.000001
typedef vector < Point3D > trinode_list;
typedef trinode_list::iterator trinode_list_iterator;
typedef trinode_list::const_iterator const_trinode_list_iterator;
typedef vector < Point3D > point_list;
typedef point_list::iterator point_list_iterator;
typedef point_list::const_iterator const_point_list_iterator;
class FGTriNodes {
private:
trinode_list node_list;
point_list node_list;
// return true of the two points are "close enough" as defined by
// FG_PROXIMITY_EPSILON
@ -72,7 +72,7 @@ public:
int simple_add( const Point3D& p );
// return the master node list
inline trinode_list get_node_list() const { return node_list; }
inline point_list get_node_list() const { return node_list; }
// return the ith point
inline Point3D get_node( int i ) const { return node_list[i]; }
@ -83,6 +83,9 @@ public:
// $Log$
// Revision 1.5 1999/03/23 22:02:55 curt
// Refinements in naming and organization.
//
// Revision 1.4 1999/03/22 23:49:05 curt
// Modifications to facilitate conversion to output format.
//

View file

@ -76,10 +76,18 @@ public:
};
typedef vector < FGTriPoly > tripoly_list;
typedef tripoly_list::iterator tripoly_list_iterator;
typedef tripoly_list::const_iterator const_tripoly_list_iterator;
#endif // _TRIPOLY_HXX
// $Log$
// Revision 1.4 1999/03/23 22:02:56 curt
// Refinements in naming and organization.
//
// Revision 1.3 1999/03/21 14:02:07 curt
// Added a mechanism to dump out the triangle structures for viewing.
// Fixed a couple bugs in first pass at triangulation.

View file

@ -41,14 +41,14 @@ int FGTriSegments::unique_add( const FGTriSeg& s ) {
triseg_list_iterator current, last;
int counter = 0;
cout << s.get_n1() << "," << s.get_n2() << endl;
// cout << s.get_n1() << "," << s.get_n2() << endl;
// see if point already exists
current = seg_list.begin();
last = seg_list.end();
for ( ; current != last; ++current ) {
if ( s == *current ) {
cout << "found an existing segment match" << endl;
// cout << "found an existing segment match" << endl;
return counter;
}
@ -63,6 +63,9 @@ int FGTriSegments::unique_add( const FGTriSeg& s ) {
// $Log$
// Revision 1.3 1999/03/23 22:02:57 curt
// Refinements in naming and organization.
//
// Revision 1.2 1999/03/20 20:32:59 curt
// First mostly successful tile triangulation works. There's plenty of tweaking
// to do, but we are marching in the right direction.