QCAD
Open Source 2D CAD
RDimRotatedData.h
Go to the documentation of this file.
1 
20 #ifndef RDIMROTATEDDATA_H
21 #define RDIMROTATEDDATA_H
22 
23 #include "entity_global.h"
24 
25 #include "RDocument.h"
26 #include "RDimLinearData.h"
27 #include "RVector.h"
28 
37  friend class RDimRotatedEntity;
38 
39 protected:
41 
42 public:
44  RDimRotatedData(const RDimensionData& dimData,
45  const RVector& extensionPoint1,
46  const RVector& extensionPoint2,
47  double rotation);
48 
49  virtual RBox getBoundingBox(bool ignoreEmpty=false) const;
50 
51  virtual bool isValid() const;
52 
53  void setRotation(double r) {
54  rotation = r;
55  }
56 
57  double getRotation() const {
58  return rotation;
59  }
60 
61  virtual QList<RVector> getReferencePoints(
63 
64 // virtual bool moveReferencePoint(const RVector& referencePoint,
65 // const RVector& targetPoint);
66 
67  virtual void recomputeDefinitionPoint(
68  const RVector& oldExtPoint1, const RVector& oldExtPoint2,
69  const RVector& newExtPoint1, const RVector& newExtPoint2);
70 
71  virtual bool rotate(double rotation, const RVector& center);
72  virtual bool mirror(const RLine& axis);
73 
74  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX, bool ignoreComplex = false) const;
75  virtual double getMeasuredValue() const;
76  virtual QString getAutoLabel() const;
77 
78 private:
80  double rotation;
81 };
82 
86 Q_DECLARE_METATYPE(QSharedPointer<RDimRotatedData>)
87 
88 #endif
virtual bool mirror(const RLine &axis)
Definition: RDimLinearData.cpp:116
Represents a box e.g.
Definition: RBox.h:43
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
#define RDEFAULT_RBOX
Definition: RBox.h:32
virtual QString getAutoLabel() const
Definition: RDimensionData.h:170
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RDimRotatedData.h:36
Linear dimension entity class.
Definition: RDimRotatedEntity.h:38
ProjectionRenderingHint
Sets the current rendering hint for exports.
Definition: RS.h:118
virtual double getMeasuredValue() const
Definition: RDimensionData.h:169
A graphics document contains and owns entities, layers, user coordinate systems, variables, block definitions, etc.
Definition: RDocument.h:63
Q_DECLARE_METATYPE(RMath *)
virtual QList< RVector > getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const
Definition: RDimensionData.cpp:128
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RDimensionData.h:38
double getRotation() const
Definition: RDimRotatedData.h:57
virtual void recomputeDefinitionPoint(const RVector &oldExtPoint1, const RVector &oldExtPoint2, const RVector &newExtPoint1, const RVector &newExtPoint2)
Definition: RDimLinearData.h:72
virtual QList< QSharedPointer< RShape > > getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false) const
Definition: REntityData.h:88
void setRotation(double r)
Definition: RDimRotatedData.h:53
Low-level mathematical representation of a line.
Definition: RLine.h:42
Definition: RS.h:119
virtual bool rotate(double rotation, const RVector &center)
Definition: RDimLinearData.cpp:100
virtual RBox getBoundingBox(bool ignoreEmpty=false) const
Definition: RDimensionData.cpp:93
RDimRotatedData data
Definition: RDimRotatedEntity.h:147
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RDimLinearData.h:36
double rotation
Fixed angle of dimension line in rad.
Definition: RDimRotatedData.h:80
virtual bool isValid() const
Definition: RDimLinearData.cpp:50
RDocument * document
Definition: RObject.h:251