ACF $AcfVersion:0$
COrientedCircle.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5#include <i2d/CCircle.h>
6
7
8namespace i2d
9{
10
11
18{
19public:
21
23 COrientedCircle(double radius, const CVector2d& center, bool orientedOutside);
24
29 bool IsOrientedOutside() const;
34 void SetOrientedOutside(bool orientedOutside);
35
36 bool operator==(const COrientedCircle& circle) const;
37 bool operator!=(const COrientedCircle& circle) const;
38
39 // reimplemented (i2d::CCircle)
40 virtual bool ConvertToPolygon(i2d::CPolygon& result, int segmentsCount = 0) const override;
41
42 // reimplemented (istd::IChangeable)
43 virtual int GetSupportedOperations() const override;
44 virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
46
47 // reimplemented (iser::ISerializable)
48 virtual bool Serialize(iser::IArchive& archive) override;
49
50private:
51 bool m_orientedOutside;
52};
53
54
55// inline methods
56
58{
59 return m_orientedOutside;
60}
61
62
63} // namespace i2d
64
65
66
67
Definition of graphical circle object.
Definition CCircle.h:22
Definition of an oriented graphical circle object.
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
virtual bool ConvertToPolygon(i2d::CPolygon &result, int segmentsCount=0) const override
Performs conversion of the circle splitting it to segmentsCount segments to the polygon result.
virtual istd::TUniqueInterfacePtr< istd::IChangeable > CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
void SetOrientedOutside(bool orientedOutside)
Set this circle oriented outside or inside.
bool operator!=(const COrientedCircle &circle) const
bool operator==(const COrientedCircle &circle) const
COrientedCircle(double radius, const CVector2d &center, bool orientedOutside)
virtual int GetSupportedOperations() const override
Get set of flags for supported operations.
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
bool IsOrientedOutside() const
Check if this circle is oriented outside.
Definition of the data model for a polygon.
Definition CPolygon.h:20
Definition of position or mathematical vector on 2D plane.
Definition CVector2d.h:29
Represents an input/output persistence archive for object serialization.
Definition IArchive.h:164
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Unique ownership smart pointer for interface types.
Contains the 2D objects.
Definition CAffine2d.h:11