awips2/nativeLib/rary.ohd.whfs/inc/general/LineSegment.h
root 8e80217e59 Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: a02aeb236c [formerly 9f19e3f712] [formerly 06a8b51d6d [formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]
Former-commit-id: 06a8b51d6d
Former-commit-id: 3360eb6c5f
2012-01-06 08:55:05 -06:00

69 lines
1.3 KiB
C

#ifndef LINE_SEGMENT_H
#define LINE_SEGMENT_H
#include "stdlib.h"
#include "stdio.h"
#include "string.h"
#include "math.h"
#include "GeoArea.h" /* database functions */
#include "geoutil.h" /* utilities */
#include "linesegs_defs.h"
/* prototypes */
int pointsEqual(Point p1, Point p2);
LineSegment * getSegmentsFromPoints(Point *points,
long numPoints,
long *numSegments);
void initLineSegment(Point p1,
Point p2,
LineSegment *s);
void getLineSegmentRelationship(LineSegment s1,
LineSegment s2,
int *intersect,
int *overlap,
Point *intersectPoint);
double evaluateLineSegmentAtX(LineSegment segment,
double x,
int *isVertical,
int *badDomain);
void getIntersectionOfSegments(LineSegment s1,
LineSegment s2,
int *intersect,
Point *p);
Point * getIntersectionPoints(LineSegment s,
const LineSegment segments[],
long numSegments,
long *numPoints);
void getXYMaxMin(const LineSegment segments[],
long numSegments,
Point *max,
Point *min);
void printPoint(Point point);
void printLineSegment(LineSegment s);
int isBetweenInclusive(double x, double start, double end);
double minDouble(double num1, double num2);
double maxDouble(double num1, double num2);
#endif