OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimLine.h
Go to the documentation of this file.
1 //*******************************************************************
2 // Copyright (C) 2000 ImageLinks Inc.
3 //
4 // License: See top level LICENSE.txt file.
5 //
6 // Author: Garrett Potts
7 //*******************************************************************
8 // $Id: ossimLine.h 23353 2015-06-01 19:19:10Z dburken $
9 #ifndef ossimLine_HEADER
10 #define ossimLine_HEADER
11 #include <ossim/base/ossimDpt.h>
12 #include <iosfwd>
13 
15 {
16 public:
18  const ossimLine& rhs);
19  ossimLine(const ossimDpt& p1=ossimDpt(0,0),
20  const ossimDpt& p2=ossimDpt(0,0))
21  :theP1(p1),
22  theP2(p2)
23  {
24  }
25 
26 
28  {
29  return (theP2-theP1);
30  }
31 
63  ossimDpt intersectInfinite(const ossimLine& line)const;
64 
65  ossimDpt intersectSegment(const ossimLine& line)const;
66 
67  ossimDpt midPoint()const;
68  double length()const;
69  ossimDpt normal()const;
73  bool isPointWithin(const ossimDpt& point, double delta=FLT_EPSILON)const;
74 
75  bool isPointOnInfiniteLine(const ossimDpt& point, double delta=FLT_EPSILON)const;
76 
79 };
80 
81 #endif
ossimDpt theP1
Definition: ossimLine.h:77
ossimLine(const ossimDpt &p1=ossimDpt(0, 0), const ossimDpt &p2=ossimDpt(0, 0))
Definition: ossimLine.h:19
ossimDpt getVector() const
Definition: ossimLine.h:27
ostream & operator<<(ostream &out, const ossimAxes &axes)
Definition: ossimAxes.h:88
#define FLT_EPSILON
ossimDpt theP2
Definition: ossimLine.h:78
#define OSSIM_DLL
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23