src/ldObject.h

Tue, 14 Feb 2017 12:58:53 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 14 Feb 2017 12:58:53 +0200
changeset 1139
51303023d651
parent 1138
0dfdef50b0ee
child 1141
7dc2c981937e
permissions
-rw-r--r--

LDObject subclass renaming:
· LDLine → LDEdgeLine
· LDCondLine → LDConditionalEdge
· LDQuad → LDQuadrilateral

655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 /*
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2 * LDForge: LDraw parts authoring CAD
1072
9ce9496427f2 Happy new year 2017!
Teemu Piippo <teemu@hecknology.net>
parents: 1045
diff changeset
3 * Copyright (C) 2013 - 2017 Teemu Piippo
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4 *
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 * This program is free software: you can redistribute it and/or modify
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 * (at your option) any later version.
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 *
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
13 * GNU General Public License for more details.
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
14 *
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 */
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 #pragma once
768
29e6c5552388 - initial overhaul with smart pointers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 767
diff changeset
20 #include <type_traits>
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21 #include "main.h"
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
22 #include "basics.h"
706
d79083b9f74d Merge ../ldforge into gl
Santeri Piippo <crimsondusk64@gmail.com>
parents: 655
diff changeset
23 #include "glShared.h"
795
195fa1fff9c3 - changed all color usage to use LDColor classes instead of color indices. Added support for direct colors.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 789
diff changeset
24 #include "colors.h"
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
25
1073
a0a0d581309b Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
Teemu Piippo <teemu@hecknology.net>
parents: 1072
diff changeset
26 class Model;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
27 class LDDocument;
776
624131d0163d - selecting an invertnext'd object now also selects the invertnext
Santeri Piippo <crimsondusk64@gmail.com>
parents: 771
diff changeset
28
1138
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
29 /*
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
30 * Object type codes.
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
31 */
786
71d786ce0dcc - LDObject::Type moved back to global namespace
Santeri Piippo <crimsondusk64@gmail.com>
parents: 785
diff changeset
32 enum LDObjectType
71d786ce0dcc - LDObject::Type moved back to global namespace
Santeri Piippo <crimsondusk64@gmail.com>
parents: 785
diff changeset
33 {
1123
15e46ea3151f Reworked iterable enums: they all are enum classes now and the end value is marked with "_End"
Teemu Piippo <teemu@hecknology.net>
parents: 1117
diff changeset
34 SubfileReference, // Object represents a sub-file reference
1139
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
35 Quadrilateral, // Object represents a quadrilateral
1123
15e46ea3151f Reworked iterable enums: they all are enum classes now and the end value is marked with "_End"
Teemu Piippo <teemu@hecknology.net>
parents: 1117
diff changeset
36 Triangle, // Object represents a triangle
1139
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
37 EdgeLine, // Object represents a line
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
38 ConditionalEdge, // Object represents a conditional line
1123
15e46ea3151f Reworked iterable enums: they all are enum classes now and the end value is marked with "_End"
Teemu Piippo <teemu@hecknology.net>
parents: 1117
diff changeset
39 Bfc, // Object represents a BFC statement
15e46ea3151f Reworked iterable enums: they all are enum classes now and the end value is marked with "_End"
Teemu Piippo <teemu@hecknology.net>
parents: 1117
diff changeset
40 Comment, // Object represents a comment
15e46ea3151f Reworked iterable enums: they all are enum classes now and the end value is marked with "_End"
Teemu Piippo <teemu@hecknology.net>
parents: 1117
diff changeset
41 Error, // Object is the result of failed parsing
15e46ea3151f Reworked iterable enums: they all are enum classes now and the end value is marked with "_End"
Teemu Piippo <teemu@hecknology.net>
parents: 1117
diff changeset
42 Empty, // Object represents an empty line
15e46ea3151f Reworked iterable enums: they all are enum classes now and the end value is marked with "_End"
Teemu Piippo <teemu@hecknology.net>
parents: 1117
diff changeset
43 BezierCurve, // Object represents a Bézier curve
15e46ea3151f Reworked iterable enums: they all are enum classes now and the end value is marked with "_End"
Teemu Piippo <teemu@hecknology.net>
parents: 1117
diff changeset
44 _End
786
71d786ce0dcc - LDObject::Type moved back to global namespace
Santeri Piippo <crimsondusk64@gmail.com>
parents: 785
diff changeset
45 };
71d786ce0dcc - LDObject::Type moved back to global namespace
Santeri Piippo <crimsondusk64@gmail.com>
parents: 785
diff changeset
46
1123
15e46ea3151f Reworked iterable enums: they all are enum classes now and the end value is marked with "_End"
Teemu Piippo <teemu@hecknology.net>
parents: 1117
diff changeset
47 MAKE_ITERABLE_ENUM(LDObjectType)
805
d88c0354de97 - refactor. got rid of the LDSharedVertex nonsense, fixed up split lines action
Santeri Piippo <crimsondusk64@gmail.com>
parents: 795
diff changeset
48
1138
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
49 /*
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
50 * Represents one line of code in an LDraw model file.
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
51 */
1073
a0a0d581309b Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
Teemu Piippo <teemu@hecknology.net>
parents: 1072
diff changeset
52 class LDObject : public QObject
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
53 {
1138
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
54 Q_OBJECT
1073
a0a0d581309b Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
Teemu Piippo <teemu@hecknology.net>
parents: 1072
diff changeset
55
786
71d786ce0dcc - LDObject::Type moved back to global namespace
Santeri Piippo <crimsondusk64@gmail.com>
parents: 785
diff changeset
56 public:
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
57 virtual QString asText() const = 0; // This object as LDraw code
1138
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
58 LDColor color() const;
1117
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
59 virtual LDColor defaultColor() const; // What color does the object default to?
1073
a0a0d581309b Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
Teemu Piippo <teemu@hecknology.net>
parents: 1072
diff changeset
60 Model* model() const;
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
61 LDPolygon* getPolygon();
1031
55c0d3beea0d removed removeDuplicates in favor of QSet, and the unused ObjectList class
Teemu Piippo <crimsondusk64@gmail.com>
parents: 1028
diff changeset
62 virtual void getVertices (QSet<Vertex>& verts) const;
1117
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
63 virtual bool hasMatrix() const; // Does this object have a matrix and position? (see LDMatrixObject)
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
64 qint32 id() const;
1117
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
65 virtual void invert(); // Inverts this object (winding is reversed)
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
66 virtual bool isColored() const;
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
67 bool isHidden() const;
1117
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
68 virtual bool isScemantic() const; // Does this object have meaning in the part model?
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
69 bool isSelected() const;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
70 int lineNumber() const;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
71 void move (Vertex vect);
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
72 LDObject* next() const;
1117
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
73 virtual int numVertices() const;
1084
63daaf652454 Split object list representation into virtual methods
Teemu Piippo <teemu@hecknology.net>
parents: 1082
diff changeset
74 virtual QString objectListText() const;
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
75 LDObject* previous() const;
1139
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
76 bool previousIsInvertnext(class LDBfc*& ptr);
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
77 QColor randomColor() const;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
78 void setColor (LDColor color);
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
79 void setHidden (bool value);
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
80 void setVertex (int i, const Vertex& vert);
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
81 void swap (LDObject* other);
1015
92c6ec099075 Added triangle count to viewport, added compile-time line length check
Teemu Piippo <crimsondusk64@gmail.com>
parents: 1014
diff changeset
82 virtual int triangleCount() const;
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
83 virtual LDObjectType type() const = 0;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
84 virtual QString typeName() const = 0;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
85 const Vertex& vertex (int i) const;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
86
1135
8e0691be0b6f Removed the intXX type aliases and removed uses of intXX_t in favor of qintXX
Teemu Piippo <teemu@hecknology.net>
parents: 1123
diff changeset
87 static LDObject* fromID(qint32 id);
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
88
1073
a0a0d581309b Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
Teemu Piippo <teemu@hecknology.net>
parents: 1072
diff changeset
89 signals:
1117
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
90 void codeChanged(QString before, QString after);
1073
a0a0d581309b Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
Teemu Piippo <teemu@hecknology.net>
parents: 1072
diff changeset
91
956
2af18ba2665f Replace LDIterate function with LDObjectIterator class
Teemu Piippo <crimsondusk64@gmail.com>
parents: 946
diff changeset
92 protected:
1073
a0a0d581309b Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
Teemu Piippo <teemu@hecknology.net>
parents: 1072
diff changeset
93 friend class Model;
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
94 LDObject (Model* model = nullptr);
956
2af18ba2665f Replace LDIterate function with LDObjectIterator class
Teemu Piippo <crimsondusk64@gmail.com>
parents: 946
diff changeset
95 virtual ~LDObject();
1082
1738bdaf36d6 The "all objects have valid models" invariant seems to be holding up now. At least basic drawing works again.
Teemu Piippo <teemu@hecknology.net>
parents: 1081
diff changeset
96 void setDocument(Model* model);
956
2af18ba2665f Replace LDIterate function with LDObjectIterator class
Teemu Piippo <crimsondusk64@gmail.com>
parents: 946
diff changeset
97
1117
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
98 template<typename T>
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
99 void changeProperty(T* property, const T& value);
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
100
786
71d786ce0dcc - LDObject::Type moved back to global namespace
Santeri Piippo <crimsondusk64@gmail.com>
parents: 785
diff changeset
101 private:
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
102 bool m_isHidden;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
103 bool m_isSelected;
1073
a0a0d581309b Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
Teemu Piippo <teemu@hecknology.net>
parents: 1072
diff changeset
104 Model* _model;
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
105 qint32 m_id;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
106 LDColor m_color;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
107 QColor m_randomColor;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
108 Vertex m_coords[4];
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
109 };
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
110
1138
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
111 /*
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
112 * Base class for objects with matrices.
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
113 */
843
9ac9060877cc - moved LDMatrixObject to be an abstract class deriving from LDObject. LDSubfile only inherits from LDMatrixObject.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 835
diff changeset
114 class LDMatrixObject : public LDObject
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
115 {
843
9ac9060877cc - moved LDMatrixObject to be an abstract class deriving from LDObject. LDSubfile only inherits from LDMatrixObject.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 835
diff changeset
116 Vertex m_position;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
117
805
d88c0354de97 - refactor. got rid of the LDSharedVertex nonsense, fixed up split lines action
Santeri Piippo <crimsondusk64@gmail.com>
parents: 795
diff changeset
118 public:
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
119 const Vertex& position() const;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
120 void setCoordinate (const Axis ax, double value);
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
121 void setPosition (const Vertex& a);
1045
f726f8f49c7e Unabbreviate "transform" to "transformationMatrix"
Teemu Piippo <teemu@hecknology.net>
parents: 1034
diff changeset
122 void setTransformationMatrix (const Matrix& value);
f726f8f49c7e Unabbreviate "transform" to "transformationMatrix"
Teemu Piippo <teemu@hecknology.net>
parents: 1034
diff changeset
123 const Matrix& transformationMatrix() const;
805
d88c0354de97 - refactor. got rid of the LDSharedVertex nonsense, fixed up split lines action
Santeri Piippo <crimsondusk64@gmail.com>
parents: 795
diff changeset
124
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
125 protected:
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
126 LDMatrixObject (Model* model = nullptr);
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
127 LDMatrixObject (const Matrix& transformationMatrix, const Vertex& pos, Model* model = nullptr);
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
128
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
129 private:
1045
f726f8f49c7e Unabbreviate "transform" to "transformationMatrix"
Teemu Piippo <teemu@hecknology.net>
parents: 1034
diff changeset
130 Matrix m_transformationMatrix;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
131 };
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
132
1138
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
133 /*
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
134 * Represents a line in the LDraw file that could not be properly parsed.
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
135 */
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
136 class LDError : public LDObject
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
137 {
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
138 public:
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
139 static constexpr LDObjectType SubclassType = LDObjectType::Error;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
140
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
141 virtual LDObjectType type() const override
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
142 {
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
143 return SubclassType;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
144 }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
145
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
146 virtual QString asText() const override;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
147 virtual void invert() override;
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
148 QString reason() const;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
149 QString contents() const;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
150 QString fileReferenced() const;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
151 void setFileReferenced (QString value);
1084
63daaf652454 Split object list representation into virtual methods
Teemu Piippo <teemu@hecknology.net>
parents: 1082
diff changeset
152 QString objectListText() const override;
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
153 bool isColored() const override { return false; }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
154 QString typeName() const override { return "error"; }
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
155
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
156 protected:
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
157 friend class Model;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
158 LDError (Model* model);
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
159 LDError (QString contents, QString reason, Model* model = nullptr);
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
160
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
161 private:
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
162 QString m_fileReferenced; // If this error was caused by inability to open a file, what file was that?
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
163 QString m_contents; // The LDraw code that was being parsed
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
164 QString m_reason;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
165 };
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
166
1138
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
167 /*
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
168 * Represents a 0 BFC statement in the LDraw code.
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
169 */
1123
15e46ea3151f Reworked iterable enums: they all are enum classes now and the end value is marked with "_End"
Teemu Piippo <teemu@hecknology.net>
parents: 1117
diff changeset
170 enum class BfcStatement
847
274a7fac44fc - refactor
Teemu Piippo <crimsondusk64@gmail.com>
parents: 844
diff changeset
171 {
274a7fac44fc - refactor
Teemu Piippo <crimsondusk64@gmail.com>
parents: 844
diff changeset
172 CertifyCCW,
274a7fac44fc - refactor
Teemu Piippo <crimsondusk64@gmail.com>
parents: 844
diff changeset
173 CCW,
274a7fac44fc - refactor
Teemu Piippo <crimsondusk64@gmail.com>
parents: 844
diff changeset
174 CertifyCW,
274a7fac44fc - refactor
Teemu Piippo <crimsondusk64@gmail.com>
parents: 844
diff changeset
175 CW,
274a7fac44fc - refactor
Teemu Piippo <crimsondusk64@gmail.com>
parents: 844
diff changeset
176 NoCertify,
274a7fac44fc - refactor
Teemu Piippo <crimsondusk64@gmail.com>
parents: 844
diff changeset
177 InvertNext,
274a7fac44fc - refactor
Teemu Piippo <crimsondusk64@gmail.com>
parents: 844
diff changeset
178 Clip,
274a7fac44fc - refactor
Teemu Piippo <crimsondusk64@gmail.com>
parents: 844
diff changeset
179 ClipCCW,
274a7fac44fc - refactor
Teemu Piippo <crimsondusk64@gmail.com>
parents: 844
diff changeset
180 ClipCW,
274a7fac44fc - refactor
Teemu Piippo <crimsondusk64@gmail.com>
parents: 844
diff changeset
181 NoClip,
1123
15e46ea3151f Reworked iterable enums: they all are enum classes now and the end value is marked with "_End"
Teemu Piippo <teemu@hecknology.net>
parents: 1117
diff changeset
182 _End
1034
a05fc8256a3a Enum stuff
Teemu Piippo <teemu@compsta2.com>
parents: 1033
diff changeset
183 };
847
274a7fac44fc - refactor
Teemu Piippo <crimsondusk64@gmail.com>
parents: 844
diff changeset
184
1123
15e46ea3151f Reworked iterable enums: they all are enum classes now and the end value is marked with "_End"
Teemu Piippo <teemu@hecknology.net>
parents: 1117
diff changeset
185 MAKE_ITERABLE_ENUM(BfcStatement)
847
274a7fac44fc - refactor
Teemu Piippo <crimsondusk64@gmail.com>
parents: 844
diff changeset
186
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
187 class LDBfc : public LDObject
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
188 {
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
189 public:
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
190 static constexpr LDObjectType SubclassType = LDObjectType::Bfc;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
191
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
192 virtual LDObjectType type() const override
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
193 {
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
194 return SubclassType;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
195 }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
196
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
197 virtual QString asText() const override;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
198 virtual void invert() override;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
199 protected:
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
200 friend class Model;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
201 LDBfc (Model* model);
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
202
805
d88c0354de97 - refactor. got rid of the LDSharedVertex nonsense, fixed up split lines action
Santeri Piippo <crimsondusk64@gmail.com>
parents: 795
diff changeset
203 public:
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
204 bool isScemantic() const override { return statement() == BfcStatement::InvertNext; }
1084
63daaf652454 Split object list representation into virtual methods
Teemu Piippo <teemu@hecknology.net>
parents: 1082
diff changeset
205 QString objectListText() const override;
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
206 BfcStatement statement() const;
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
207 void setStatement (BfcStatement value);
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
208 QString statementToString() const;
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
209 bool isColored() const override { return false; }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
210 QString typeName() const override { return "bfc"; }
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
211
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
212 static QString statementToString (BfcStatement statement);
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
213
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
214 protected:
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
215 LDBfc (const BfcStatement type, Model* model = nullptr);
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
216
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
217 private:
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
218 BfcStatement m_statement;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
219 };
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
220
1138
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
221 /*
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
222 * Represents a single code-1 subfile reference.
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
223 */
1011
4fdd74a04790 Rename LDSubfile to LDSubfileReference
Teemu Piippo <crimsondusk64@gmail.com>
parents: 1006
diff changeset
224 class LDSubfileReference : public LDMatrixObject
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
225 {
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
226 public:
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
227 static constexpr LDObjectType SubclassType = LDObjectType::SubfileReference;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
228
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
229 virtual LDObjectType type() const override
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
230 {
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
231 return SubclassType;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
232 }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
233
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
234 virtual QString asText() const override;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
235 virtual void invert() override;
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
236 LDDocument* fileInfo() const;
1031
55c0d3beea0d removed removeDuplicates in favor of QSet, and the unused ObjectList class
Teemu Piippo <crimsondusk64@gmail.com>
parents: 1028
diff changeset
237 virtual void getVertices (QSet<Vertex>& verts) const override;
1073
a0a0d581309b Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
Teemu Piippo <teemu@hecknology.net>
parents: 1072
diff changeset
238 void inlineContents(Model& model, bool deep, bool render);
805
d88c0354de97 - refactor. got rid of the LDSharedVertex nonsense, fixed up split lines action
Santeri Piippo <crimsondusk64@gmail.com>
parents: 795
diff changeset
239 QList<LDPolygon> inlinePolygons();
1084
63daaf652454 Split object list representation into virtual methods
Teemu Piippo <teemu@hecknology.net>
parents: 1082
diff changeset
240 QString objectListText() const override;
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
241 void setFileInfo (LDDocument* fileInfo);
1015
92c6ec099075 Added triangle count to viewport, added compile-time line length check
Teemu Piippo <crimsondusk64@gmail.com>
parents: 1014
diff changeset
242 int triangleCount() const override;
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
243 bool hasMatrix() const override { return true; }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
244 QString typeName() const override { return "subfilereference"; }
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
245
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
246 protected:
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
247 friend class Model;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
248 LDSubfileReference (Model* model);
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
249 LDSubfileReference(LDDocument* reference, const Matrix& transformationMatrix, const Vertex& position, Model* model = nullptr);
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
250
988
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
251 private:
ac4a2ae54f76 Refactor LDObject API
Teemu Piippo <crimsondusk64@gmail.com>
parents: 968
diff changeset
252 LDDocument* m_fileInfo;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
253 };
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
254
1138
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
255 /*
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
256 * Represents a single code-2 line in the LDraw code file.
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
257 */
1139
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
258 class LDEdgeLine : public LDObject
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
259 {
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
260 public:
1139
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
261 static constexpr LDObjectType SubclassType = LDObjectType::EdgeLine;
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
262
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
263 virtual LDObjectType type() const override
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
264 {
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
265 return SubclassType;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
266 }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
267
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
268 virtual QString asText() const override;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
269 virtual void invert() override;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
270 int numVertices() const override { return 2; }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
271 LDColor defaultColor() const override { return EdgeColor; }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
272 QString typeName() const override { return "line"; }
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
273
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
274 protected:
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
275 friend class Model;
1139
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
276 LDEdgeLine (Model* model);
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
277 LDEdgeLine (Vertex v1, Vertex v2, Model* model = nullptr);
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
278 };
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
279
1138
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
280 /*
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
281 * Represents a single code-5 conditional line.
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
282 */
1139
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
283 class LDConditionalEdge : public LDEdgeLine
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
284 {
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
285 public:
1139
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
286 static constexpr LDObjectType SubclassType = LDObjectType::ConditionalEdge;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
287
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
288 virtual LDObjectType type() const override
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
289 {
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
290 return SubclassType;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
291 }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
292
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
293 virtual QString asText() const override;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
294 virtual void invert() override;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
295 int numVertices() const override { return 4; }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
296 LDColor defaultColor() const override { return EdgeColor; }
1139
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
297 LDEdgeLine* becomeEdgeLine();
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
298 QString typeName() const override { return "condline"; }
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
299
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
300 protected:
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
301 friend class Model;
1139
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
302 LDConditionalEdge (Model* model);
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
303 LDConditionalEdge (const Vertex& v0, const Vertex& v1, const Vertex& v2, const Vertex& v3, Model* model = nullptr);
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
304 };
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
305
1138
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
306 /*
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
307 * Represents a single code-3 triangle in the LDraw code file.
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
308 */
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
309 class LDTriangle : public LDObject
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
310 {
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
311 public:
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
312 static constexpr LDObjectType SubclassType = LDObjectType::Triangle;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
313
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
314 virtual LDObjectType type() const override
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
315 {
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
316 return SubclassType;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
317 }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
318
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
319 virtual QString asText() const override;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
320 virtual void invert() override;
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
321 int triangleCount() const override;
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
322 int numVertices() const override { return 3; }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
323 QString typeName() const override { return "triangle"; }
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
324
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
325 protected:
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
326 friend class Model;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
327 LDTriangle (Model* model);
1074
a62f810ca26f Made the quad→triangles use emplacement. However, now it crashes because of problems in the underlying system (the LDObject constructor shouldn't do anything in regard to the model!)
Teemu Piippo <teemu@hecknology.net>
parents: 1073
diff changeset
328 LDTriangle (Vertex const& v1, Vertex const& v2, Vertex const& v3, Model* model = nullptr);
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
329 };
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
330
1138
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
331 /*
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
332 * Represents a single code-4 quadrilateral.
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
333 */
1139
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
334 class LDQuadrilateral : public LDObject
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
335 {
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
336 public:
1139
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
337 static constexpr LDObjectType SubclassType = LDObjectType::Quadrilateral;
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
338
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
339 virtual LDObjectType type() const override
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
340 {
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
341 return SubclassType;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
342 }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
343
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
344 QString asText() const override;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
345 void invert() override;
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
346 int triangleCount() const override;
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
347 int numVertices() const override { return 4; }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
348 QString typeName() const override { return "quad"; }
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
349
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
350 protected:
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
351 friend class Model;
1139
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
352 LDQuadrilateral (Model* model);
51303023d651 LDObject subclass renaming:
Teemu Piippo <teemu@hecknology.net>
parents: 1138
diff changeset
353 LDQuadrilateral (const Vertex& v1, const Vertex& v2, const Vertex& v3, const Vertex& v4, Model* model = nullptr);
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
354 };
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
355
1138
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
356 /*
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
357 * Models a Bézier curve. It is stored as a special comment in the LDraw code file and can be inlined down into line segments.
0dfdef50b0ee Updated comments
Teemu Piippo <teemu@hecknology.net>
parents: 1137
diff changeset
358 */
1000
c064cc048f14 Begin work on Bézier curve support. They can be drawn but don't render in 3D and they load as comments.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 995
diff changeset
359 class LDBezierCurve : public LDObject
c064cc048f14 Begin work on Bézier curve support. They can be drawn but don't render in 3D and they load as comments.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 995
diff changeset
360 {
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
361 public:
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
362 static constexpr LDObjectType SubclassType = LDObjectType::BezierCurve;
1000
c064cc048f14 Begin work on Bézier curve support. They can be drawn but don't render in 3D and they load as comments.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 995
diff changeset
363
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
364 virtual LDObjectType type() const override
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
365 {
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
366 return SubclassType;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
367 }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
368
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
369 virtual QString asText() const override;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
370 virtual void invert() override;
1002
a3ee23db8393 Bézier curves may now be serialized down using the "Demote" function. I need to rename that now.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 1000
diff changeset
371 Vertex pointAt (qreal t) const;
1073
a0a0d581309b Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
Teemu Piippo <teemu@hecknology.net>
parents: 1072
diff changeset
372 void rasterize(Model& model, int segments);
1023
9450ac3cd930 Split grid stuff into a new class Grid in grid.cpp/grid.h
Teemu Piippo <crimsondusk64@gmail.com>
parents: 1015
diff changeset
373 QVector<LDPolygon> rasterizePolygons (int segments);
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
374 int numVertices() const override { return 4; }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
375 LDColor defaultColor() const override { return EdgeColor; }
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
376 QString typeName() const override { return "beziercurve"; }
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
377
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
378 protected:
1137
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
379 friend class Model;
2b6488d11305 Inlined away the LDOBJ macros in ldobject.h.
Teemu Piippo <teemu@hecknology.net>
parents: 1135
diff changeset
380 LDBezierCurve (Model* model);
1081
47cde4087cc5 Made all LDObject constructors protected. Emplacement is now the only way to create objects.
Teemu Piippo <teemu@hecknology.net>
parents: 1080
diff changeset
381 LDBezierCurve (const Vertex& v0, const Vertex& v1, const Vertex& v2, const Vertex& v3, Model* model = nullptr);
1000
c064cc048f14 Begin work on Bézier curve support. They can be drawn but don't render in 3D and they load as comments.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 995
diff changeset
382 };
c064cc048f14 Begin work on Bézier curve support. They can be drawn but don't render in 3D and they load as comments.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 995
diff changeset
383
861
83426c5fa732 - major identifier renaming
Teemu Piippo <crimsondusk64@gmail.com>
parents: 860
diff changeset
384 enum
83426c5fa732 - major identifier renaming
Teemu Piippo <crimsondusk64@gmail.com>
parents: 860
diff changeset
385 {
83426c5fa732 - major identifier renaming
Teemu Piippo <crimsondusk64@gmail.com>
parents: 860
diff changeset
386 LowResolution = 16,
83426c5fa732 - major identifier renaming
Teemu Piippo <crimsondusk64@gmail.com>
parents: 860
diff changeset
387 HighResolution = 48
83426c5fa732 - major identifier renaming
Teemu Piippo <crimsondusk64@gmail.com>
parents: 860
diff changeset
388 };
1117
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
389
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
390 /*
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
391 * Changes a property in a manner that emits the appropriate signal to notify that the object changed.
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
392 */
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
393 template<typename T>
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
394 void LDObject::changeProperty(T* property, const T& value)
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
395 {
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
396 if (*property != value)
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
397 {
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
398 QString before = asText();
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
399 *property = value;
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
400 emit codeChanged(before, asText());
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
401 }
efcb47c64a72 Moved LDComment and LDEmpty into their own source file pairs.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
402 }

mercurial