87 double* errorFactorPtr =
NULL)
override;
91 double* errorFactorPtr =
NULL)
override;
96 double* errorFactorPtr =
NULL)
const override;
101 double* errorFactorPtr =
NULL)
const override;
113 virtual bool IsEqual(
const IChangeable&
object)
const override;
123 typedef std::vector<i2d::CVector2d> Nodes;
128 static bool ApplyTransform(Nodes& nodes,
131 double* errorFactorPtr =
NULL);
136 static bool ApplyInverseTransform(
140 double* errorFactorPtr =
NULL);
150 return int(m_positions.size());
156 return m_positions.empty();
162 Q_ASSERT(index >= 0 && index <
int(m_positions.size()));
164 return m_positions[index];
170 Q_ASSERT(index >= 0 && index <
int(m_positions.size()));
172 return m_positions[index];
178 Q_ASSERT(index >= 0 && index <
int(m_positions.size()));
181 Q_UNUSED(changeNotifier);
183 m_positions[index] = position;
Base class for 2D-objects implementing interface i2d::IObject2d.
Definition of the data model for a polygon.
static QByteArray GetTypeName()
static const istd::IChangeable::ChangeSet s_removePolygonNodeChange
virtual bool InsertNode(const i2d::CVector2d &position)
Insert a node at the end of node table.
virtual const i2d::CVector2d & GetNodePos(int index) const
Return position of node at specified index.
virtual void Clear()
Removes all nodes.
virtual void SetNodePos(int index, const i2d::CVector2d &position)
Set node at specified index.
virtual void MoveCenterTo(const CVector2d &position) override
Move object to position position.
bool IsEmpty() const
Return true if there are no points.
virtual int GetNodesCount() const
Return size of node table.
virtual bool InvTransform(const ITransformation2d &transformation, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) override
Do inverse transformation of this object.
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
i2d::CVector2d & GetNodePosRef(int index)
Get reference to position object for node.
virtual bool IsEqual(const IChangeable &object) const override
virtual void SetNodesCount(int nodesCount)
Set new nodes count.
static const istd::IChangeable::ChangeSet s_insertPolygonNodeChange
virtual bool Transform(const ITransformation2d &transformation, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) override
Transform this object using some transformation.
virtual QByteArray GetFactoryId() const override
virtual i2d::CRectangle GetBoundingBox() const override
Get bounding box of this shape.
virtual CVector2d GetCenter() const override
Returns center of this 2D-object.
virtual bool GetTransformed(const ITransformation2d &transformation, IObject2d &result, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) const override
Calulate transformation of the object into second one.
static const istd::IChangeable::ChangeSet s_clearAllNodesChange
virtual bool RemoveNode(int index)
Remove a node at specified index.
virtual bool InsertNode(int index, const i2d::CVector2d &position)
Insert a node at specified index.
static const istd::IChangeable::ChangeSet s_createPolygonNodesChange
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
virtual int GetSupportedOperations() const override
Get set of flags for supported operations.
virtual istd::TUniqueInterfacePtr< istd::IChangeable > CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
virtual bool GetInvTransformed(const ITransformation2d &transformation, IObject2d &result, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) const override
Calulate inverse transformation of the object into second one.
Definition of rectangle area orthogonal to axis of coordination system.
Definition of position or mathematical vector on 2D plane.
Common interface for describing the 2D-objects.
Represents an input/output persistence archive for object serialization.
Help class which provides the automatic update mechanism of the model.
Set of change flags (its IDs).
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Unique ownership smart pointer for interface types.