src/linetypes/object.h

changeset 81
62373840e33a
parent 77
028798a72591
child 86
4bec0525ef1b
equal deleted inserted replaced
80:764381756899 81:62373840e33a
79 { 79 {
80 Success = 0, 80 Success = 0,
81 PropertyNotHandled, 81 PropertyNotHandled,
82 InvalidValue 82 InvalidValue
83 }; 83 };
84 class BadPointIndex : public std::exception
85 {
86 };
84 Object(); 87 Object();
85 Object(const Object&) = delete; 88 Object(const Object&) = delete;
86 virtual ~Object(); 89 virtual ~Object();
87 const id_t id; 90 const id_t id;
88 //virtual void toString(QTextStream &out) = 0; 91 //virtual void toString(QTextStream &out) = 0;
93 virtual QBrush textRepresentationForeground() const; 96 virtual QBrush textRepresentationForeground() const;
94 virtual QBrush textRepresentationBackground() const; 97 virtual QBrush textRepresentationBackground() const;
95 virtual QFont textRepresentationFont() const; 98 virtual QFont textRepresentationFont() const;
96 virtual void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const; 99 virtual void getPolygons(std::vector<gl::Polygon>& polygons, GetPolygonsContext* context) const;
97 virtual void invert() {} 100 virtual void invert() {}
101 virtual int numPoints() const { return 0; }
102 virtual const glm::vec3& getPoint(int index) const;
98 }; 103 };
99 104
100 class ldraw::ColoredObject : public Object 105 class ldraw::ColoredObject : public Object
101 { 106 {
102 public: 107 public:

mercurial