CObjectFeature.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 // ACF includes
5 #include <i2d/CPosition2d.h>
7 
8 // ACF-Solutions includes
10 
11 
12 namespace iipr
13 {
14 
15 
19 class CObjectFeature: public TWeightedFeatureWrap<i2d::CPosition2d>
20 {
21 public:
23 
26  double weight,
27  const i2d::CVector2d& position,
28  double angle = 0.0,
29  const i2d::CVector2d& scale = i2d::CVector2d(1.0, 1.0));
30 
31  double GetAngle() const;
32  i2d::CVector2d GetScale() const;
33 
34  QByteArray GetObjectId() const;
35  void SetObjectId(const QByteArray& objectId);
36 
38 
39  // reimplemented (imeas::INumericValue)
40  virtual bool IsValueTypeSupported(ValueTypeId valueTypeId) const;
41  virtual imath::CVarVector GetComponentValue(ValueTypeId valueTypeId) const;
42 
43  // reimplemented (iser::ISerializable)
44  virtual bool Serialize(iser::IArchive& archive);
45 
46  // reimplemented (istd::IChangeable)
47  virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS);
48  virtual istd::IChangeable* CloneMe(CompatibilityMode mode = CM_WITHOUT_REFS) const;
49 
50 private:
51  double m_angle;
52  i2d::CVector2d m_scale;
53  QByteArray m_objectId;
54  mutable i2d::CAffineTransformation2d m_transformation;
55 };
56 
57 
58 } // namespace iipr
59 
60 
virtual istd::IChangeable * CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const
virtual bool IsValueTypeSupported(ValueTypeId valueTypeId) const
Check if the given value type (or value component) is supported.
TWeightedFeatureWrap< i2d::CPosition2d > BaseClass
double GetAngle() const
const i2d::ITransformation2d & GetTransformation() const
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
Implementation of a general image object feature.
void SetObjectId(const QByteArray &objectId)
virtual bool Serialize(iser::IArchive &archive)
QByteArray GetObjectId() const
i2d::CVector2d GetScale() const
Wrapper allowing to create feature object from some another serializable one.
virtual imath::CVarVector GetComponentValue(ValueTypeId valueTypeId) const
Get access to component value of the given type.
ValueTypeId
Define standard numeric value types.
Definition: INumericValue.h:26

© 2007-2017 Witold Gantzke and Kirill Lepskiy