geirs2Panic  Richard J. Mathar
Fits header keyword batch editor
 All Classes Files Functions Variables Macros Pages
Square2D.h
Go to the documentation of this file.
1 #ifndef SQUARE2D_H
2 #define SQUARE2D_H
3 /*
4 * "$Header:$"
5 *
6 */
7 
8 // class Tria2D ;
9 
10 #include "Point2D.h"
11 #include "Line2D.h"
12 #include "Circle2D.h"
13 #include "Tria2D.h"
14 #include "Bbox2D.h"
15 
16 using namespace std ;
17 
23 class Square2D {
24 
25 public:
28  Point2D vert[4] ;
29 
32  double eLen ;
33 
34  Square2D(const Point2D &pt1, const Point2D & pt2) ;
35  Square2D(const Point2D &pt1, const Point2D & pt2,
36  const Point2D & pt3, const Point2D & pt4) ;
37  Square2D() ;
38  // ~Square2D() ;
39 
40  operator Bbox2D() const ;
41 
42  Line2D edge(int no) const ;
43 
44  Circle2D circumC() const ;
45 
46  double area() const ;
47 
48  Tria2D * dissect() const ;
49 
50  Square2D apply(const RotTrans2D & rt) const ;
51 
52  vector<Tria2D> intersect(const Square2D & oth) const ;
53 
54 protected:
55 
56 private:
57 
58 } ; /* Square2D */
59 
60 #endif /* SQUARE2D_H */
61 
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
A rotation followed by a translation.
Definition: RotTrans2D.h:34
double eLen
Edge length.
Definition: Square2D.h:32
A 2-dimensional rectangular boundary box parallel to the two Cartesian axes.
Definition: Bbox2D.h:17
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