#include "object.h"
+enum DimensionType { DTLinear, DTRadial, DTDiametric, DTCircumferential, DTLeader };
+
class Dimension: public Object
{
public:
- Dimension(Vector, Vector, Object * p = 0);
+ Dimension(Vector, Vector, DimensionType dt = DTLinear, Object * p = 0);
+ Dimension(Vector *, Vector *, DimensionType dt = DTLinear, Object * p = 0);
~Dimension();
- virtual void Draw(QPainter *);
+ virtual void Draw(Painter *);
virtual Vector Center(void);
virtual bool Collided(Vector);
virtual void PointerMoved(Vector);
virtual void PointerReleased(void);
- void SetPoint1(Vector);
- void SetPoint2(Vector);
+ void SetPoint1(Vector *);
+ void SetPoint2(Vector *);
+ Vector GetPoint1(void);
+ Vector GetPoint2(void);
void FlipSides(void);
protected:
bool draggingHandle2;
bool objectWasDragged;
double length;
+ DimensionType type;
+
+ Vector * point1; // These couple to external points; if there
+ Vector * point2; // are none then fall back to endpoint/position
};
#endif // __DIMENSION_H__