1
0
Fork 0

maintenance: clean up

This commit is contained in:
scttgs0 2024-03-31 21:34:31 -05:00
parent 9d9c6033c2
commit c1234c1c2d
10 changed files with 9 additions and 17 deletions

View file

@ -67,7 +67,7 @@ void TGConstruct::LoadElevationArray(bool add_nodes)
// fix the elevations of the geodetic nodes
// This should be done in the nodes class itself, except for the need for the triangle type
// hopefully, this will get better when we have the area lookup via superpoly...
// hopefully, this will get better when we have the area lookup via super-poly...
void TGConstruct::CalcElevations(void)
{
std::vector<SGGeod> raw_nodes;

View file

@ -69,7 +69,7 @@ SGVec3f TGConstruct::calc_normal(double area, const SGVec3d& p1, const SGVec3d&
void TGConstruct::calc_normals(std::vector<SGGeod>& geod_nodes, std::vector<SGVec3d>& wgs84_nodes, tgPolygon& poly)
{
// for each face in the superpoly, calculate a face normal
// for each face in the super-poly, calculate a face normal
SGVec3f normal;
for (unsigned int tri = 0; tri < poly.Triangles(); tri++) {

View file

@ -1,9 +1,9 @@
// TGLandclass.cxx -- Class toSimnplify dealing with shape heiarchy:
// TGLandclass.cxx -- Class to simplify dealing with shape heirarchy:
// landclass contains each area (layer) of a tile
// Each area is a list of shapes
// A shape has 1 or more segments
// (when the shape represents line data)
// And the segment is a superpoly, containing
// And the segment is a super-poly, containing
// - a polygon, triangulation, point normals, face normals, etc.
//
// Written by Curtis Olson, started May 1999.

View file

@ -23,7 +23,6 @@
# include <netinet/in.h>
# include <unistd.h>
# include <utmp.h>
# include <strings.h> // bcopy() on Irix
#endif
#include <sys/types.h>
#include <sys/stat.h>
@ -33,7 +32,6 @@
#include <stdio.h>
#include <stdlib.h> // atoi()
#include <string.h> // bcopy(), sterror()
#include <simgear/compiler.h>
@ -255,7 +253,7 @@ static bool must_generate( const SGBucket& b ) {
}
// build the specified tile, return true if contruction completed
// build the specified tile, return true if construction completed
// successfully
bool construct_tile( const SGBucket& b,
const string& result_file,
@ -418,7 +416,7 @@ int main(int argc, char *argv[]) {
// check if the master switch is on
check_master_switch();
// niceness policy: This whole process should run niced. But
// niceness policy: This whole process should run nicely. But
// additionally, if there is interactive use, we will sleep
// for 60 seconds between each tile to stagger out the load
// and impose less of an impact on the machine.

View file

@ -12,7 +12,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _MSC_VER
# include <winsock2.h>
typedef int socklen_t;

View file

@ -31,7 +31,6 @@
#include <sys/types.h>
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include "array.hxx"

View file

@ -11,7 +11,6 @@
#include <sys/types.h>
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include "array.hxx"

View file

@ -10,7 +10,6 @@
namespace TNT
{
using namespace std;
/**
@returns hypotenuse of real (non-complex) scalars a and b by
avoiding underflow/overflow

View file

@ -1636,7 +1636,7 @@ bool Clipper::ExecuteInternal()
void Clipper::SetWindingCount(TEdge &edge)
{
TEdge *e = edge.PrevInAEL;
//find the edge of the same polytype that immediately preceeds 'edge' in AEL
//find the edge of the same polytype that immediately precedes 'edge' in AEL
while (e && ((e->PolyTyp != edge.PolyTyp) || (e->WindDelta == 0))) e = e->PrevInAEL;
if (!e)
{
@ -2691,7 +2691,7 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge)
{
//this code block inserts extra coords into horizontal edges (in output
//polygons) whereever maxima touch these horizontal edges. This helps
//polygons) wherever maxima touch these horizontal edges. This helps
//'simplifying' polygons (ie if the Simplify property is set).
if (m_Maxima.size() > 0)
{
@ -3546,7 +3546,7 @@ bool Clipper::JoinPoints(Join *j, OutRec* outRec1, OutRec* outRec2)
if (op2b->Next == op2 || op2b->Next == op1) return false; //a flat 'polygon'
cInt Left, Right;
//Op1 --> Op1b & Op2 --> Op2b are the extremites of the horizontal edges
//Op1 --> Op1b & Op2 --> Op2b are the extremities of the horizontal edges
if (!GetOverlap(op1->Pt.X, op1b->Pt.X, op2->Pt.X, op2b->Pt.X, Left, Right))
return false;
@ -4136,7 +4136,6 @@ void ClipperOffset::DoOffset(double delta)
}
else
{
k = 1;
m_sinA = 0;
if (node.m_endtype == EndType::OpenSquare)
DoSquare(0, 1);

View file

@ -175,7 +175,6 @@ SGGeod InterpolateElevation( const SGGeod& dst_node, const SGGeod& start, const
return SGGeod::fromDegM( dst_node.getLongitudeDeg(), dst_node.getLatitudeDeg(), dest_elevation );
}
void tgPolygon::InheritElevations( const tgPolygon& source )
{
UniqueSGGeodSet src_nodes;