Fade2.5D Documentation pages v2.16.8
Delaunay Features
Circle2.h
Go to the documentation of this file.
1 // Copyright (C) Geom Software e.U, Bernhard Kornberger, Graz/Austria
2 //
3 // This file is part of the Fade2D library. The student license is free
4 // of charge and covers personal, non-commercial research. Licensees
5 // holding a commercial license may use this file in accordance with
6 // the Commercial License Agreement.
7 //
8 // This software is provided AS IS with NO WARRANTY OF ANY KIND,
9 // INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
10 // FOR A PARTICULAR PURPOSE.
11 //
12 // Please contact the author if any conditions of this licensing are
13 // unclear to you.
14 //
15 // Support: https://www.geom.at/contact/
16 // Project: https://www.geom.at/fade2d/html/
17 
18 
20 #pragma once
21 #include "Point2.h"
22 
23 #include "common.h"
24 #if GEOM_PSEUDO3D==GEOM_TRUE
25  namespace GEOM_FADE25D {
26 #elif GEOM_PSEUDO3D==GEOM_FALSE
27  namespace GEOM_FADE2D {
28 #else
29  #error GEOM_PSEUDO3D is not defined
30 #endif
31 
40 class Circle2
41 {
42 public:
49  CLASS_DECLSPEC
50  Circle2(double x,double y,double sqRadius_);
51 
57  CLASS_DECLSPEC
58  Circle2(const Point2& center_,double sqRadius_);
60  CLASS_DECLSPEC
66  CLASS_DECLSPEC
67  double getRadius();
68 
73  CLASS_DECLSPEC
74  double getSqRadius();
75 
80  CLASS_DECLSPEC
82  CLASS_DECLSPEC
83  friend std::ostream &operator<<(std::ostream &stream, Circle2 b);
84 protected:
85  Point2 center;
86  double sqRadius;
87 };
88 
89 } // (namespace)
std::ostream & operator<<(std::ostream &stream, const Bbox2 &pC)
Prints the bounding box to a stream.
Definition: Bbox2.h:605
Point2 center(const Point2 &p0, const Point2 &p1)
Compute the midpoint of points p0 and p1.
Definition: Point2.h:782
Circle class for visualization.
Definition: Circle2.h:41
CLASS_DECLSPEC ~Circle2()
Destructor.
CLASS_DECLSPEC Point2 getCenter()
Get the center of the circle.
CLASS_DECLSPEC double getRadius()
Get the radius of the circle.
CLASS_DECLSPEC Circle2(double x, double y, double sqRadius_)
Constructor.
CLASS_DECLSPEC double getSqRadius()
Get the squared radius of the circle.
CLASS_DECLSPEC Circle2(const Point2 &center_, double sqRadius_)
Constructor.
Represents a 2.5D point.
Definition: Point2.h:76