ACF $AcfVersion:0$
CSpline.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// Qt includes
6#include <QtCore/QVector>
7
8// ACF includes
9#include <i2d/CPolyline.h>
10#include <i2d/CSplineSegment.h>
11
12
13// forward declarations
14namespace i2d{
15 class CSpline;
16} // namespace i2d
17
18
19namespace i2d
20{
21
22
28{
29public:
31
33
37 virtual int GetSegmentCount() const;
38
43 virtual const CSplineSegment& GetSplineSegment(int index) const;
44
48 virtual bool InsertSplineSegment(const CSplineSegment& segment);
49
50 // reimplemented (istd::IChangeable)
51 virtual int GetSupportedOperations() const override;
52 virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
54
55protected:
56 void CalcAllSegments() const;
57
58private:
59 static void SolveOpen(double* d,int count);
60
61 mutable QVector<CSplineSegment> m_segments;
62 mutable bool m_isInvalidated;
63};
64
65
66} // namespace i2d
67
68
2D-object representing a polyline.
Definition CPolyline.h:19
Represents a smooth cubic spline curve passing through a set of control points.
Definition CSpline.h:28
virtual const CSplineSegment & GetSplineSegment(int index) const
Get segment in polynomial.
virtual bool InsertSplineSegment(const CSplineSegment &segment)
Insert a segment at the end of spline segment table.
virtual istd::IChangeableUniquePtr CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
void CalcAllSegments() const
virtual int GetSegmentCount() const
Get count of segments.
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
virtual int GetSupportedOperations() const override
Get set of flags for supported operations.
i2d::CPolyline BaseClass
Definition CSpline.h:30
Represents a single cubic polynomial segment of a spline curve.
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Contains the 2D objects.
Definition CAffine2d.h:11