geirs2Panic  Richard J. Mathar
Fits header keyword batch editor
 All Classes Files Functions Variables Macros Pages
Tria2D.h
Go to the documentation of this file.
1 #ifndef TRIA2D_H
2 #define TRIA2D_H
3 /*
4 * "$Header:$"
5 *
6 */
7 
8 #include <vector>
9 
10 /* forward declaration needed because otherwise cyclic
11 * inclusion of Square2D.h and Tria2D.h.
12 */
13 class Square2D ;
14 
15 #include "Point2D.h"
16 #include "Line2D.h"
17 #include "Circle2D.h"
18 
19 using namespace std ;
20 
26 class Tria2D {
27 
28 public:
31  Point2D vert[3] ;
32 
33  Tria2D(const Point2D &pt1, const Point2D & pt2, const Point2D & pt3) ;
34  Tria2D() ;
35  // ~Tria2D() ;
36 
37  Line2D edge(int no) const ;
38 
39  double area() const ;
40 
41  Circle2D circumC() const ;
42 
43  vector<Tria2D> chop(const Line2D & lin) const ;
44  vector<Tria2D> intersect(const Tria2D & oth) const ;
45  vector<Tria2D> intersect(const Square2D & oth) const ;
46 
47 protected:
48 
49 private:
50 
51 } ; /* Tria2D */
52 
53 #endif /* TRIA2D_H */
54 
A circle represented by center point coordinate and radius.
Definition: Circle2D.h:22
A triangle represented by the Cartesian coordinates of its three vertices.
Definition: Tria2D.h:26
An oriented line section represented by the 2-dimensional coordinates of starting and terminating poi...
Definition: Line2D.h:22
A square represented by the four vertices of the corners.
Definition: Square2D.h:23
A point with 2 coordinates represented in a Cartesian coordinate system.
Definition: Point2D.h:20