ICF 3.1.1.10
Technical documentation of ICF Libraries
COrientedCircle.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9#include <i2d/CCircle.h>
10
11
12namespace i2d
13{
14
15
22{
23public:
25
27 COrientedCircle(double radius, const CVector2d& center, bool orientedOutside);
28
33 bool IsOrientedOutside() const;
38 void SetOrientedOutside(bool orientedOutside);
39
40 bool operator==(const COrientedCircle& circle) const;
41 bool operator!=(const COrientedCircle& circle) const;
42
43 // reimplemented (i2d::CCircle)
44 bool ConvertToPolygon(i2d::CPolygon& result, int segmentsCount = 0) const override;
45
46 // reimplemented (istd::IChangeable)
47 int GetSupportedOperations() const override;
48 bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
49 std::unique_ptr<istd::IChangeable> CloneMe(CompatibilityMode mode = CM_WITHOUT_REFS) const override;
50
51 // reimplemented (iser::ISerializable)
52 bool Serialize(iser::IArchive& archive) override;
53
54private:
55 bool m_orientedOutside;
56};
57
58
59// inline methods
60
62{
63 return m_orientedOutside;
64}
65
66
67} // namespace i2d
68
69
Definition of graphical circle object.
Definition CCircle.h:26
Definition of an oriented graphical circle object.
bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
void SetOrientedOutside(bool orientedOutside)
Set this circle oriented outside or inside.
bool operator!=(const COrientedCircle &circle) const
bool operator==(const COrientedCircle &circle) const
std::unique_ptr< istd::IChangeable > CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
COrientedCircle(double radius, const CVector2d &center, bool orientedOutside)
bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
int GetSupportedOperations() const override
Get set of flags for supported operations.
bool ConvertToPolygon(i2d::CPolygon &result, int segmentsCount=0) const override
Performs conversion of the circle splitting it to segmentsCount segments to the polygon result.
bool IsOrientedOutside() const
Check if this circle is oriented outside.
Definition of the data model for a polygon.
Definition CPolygon.h:24
Definition of position or mathematical vector on 2D plane.
Definition CVector2d.h:29
Represent input/output persistence archive.
Definition IArchive.h:34
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Contains the 2D objects.
Definition CAffine2d.h:15

© Witold Gantzke and Kirill Lepskiy