96 const vertex& getVertex (int i) const; // Get a vertex by index |
96 const vertex& getVertex (int i) const; // Get a vertex by index |
97 virtual bool hasMatrix() const; // Does this object have a matrix and position? (see LDMatrixObject) |
97 virtual bool hasMatrix() const; // Does this object have a matrix and position? (see LDMatrixObject) |
98 virtual void invert(); // Inverts this object (winding is reversed) |
98 virtual void invert(); // Inverts this object (winding is reversed) |
99 virtual bool isColored() const; // Is this object colored? |
99 virtual bool isColored() const; // Is this object colored? |
100 virtual bool isScemantic() const; // Does this object have meaning in the part model? |
100 virtual bool isScemantic() const; // Does this object have meaning in the part model? |
101 virtual void move (vertex vect); // Moves this object using the given vertex as a movement vector |
101 virtual void move (vertex vect); // Moves this object using the given vertex as a movement List |
102 LDObject* next() const; // Object after this in the current file |
102 LDObject* next() const; // Object after this in the current file |
103 LDObject* prev() const; // Object prior to this in the current file |
103 LDObject* prev() const; // Object prior to this in the current file |
104 virtual str raw() { return ""; } // This object as LDraw code |
104 virtual str raw() { return ""; } // This object as LDraw code |
105 void replace (LDObject* other); // Replace this LDObject with another LDObject. Object is deleted in the process. |
105 void replace (LDObject* other); // Replace this LDObject with another LDObject. Object is deleted in the process. |
106 void setVertex (int i, const vertex& vert); // Set a vertex to the given value |
106 void setVertex (int i, const vertex& vert); // Set a vertex to the given value |
110 virtual str typeName() const; // Type name of this object |
110 virtual str typeName() const; // Type name of this object |
111 virtual short vertices() const; // Number of vertices this object has |
111 virtual short vertices() const; // Number of vertices this object has |
112 |
112 |
113 static str typeName (LDObject::Type type); // Get type name by enumerator |
113 static str typeName (LDObject::Type type); // Get type name by enumerator |
114 static LDObject* getDefault (const LDObject::Type type); // Returns a sample object by the given enumerator |
114 static LDObject* getDefault (const LDObject::Type type); // Returns a sample object by the given enumerator |
115 static void moveObjects (vector<LDObject*> objs, const bool up); // TODO: move this to LDOpenFile? |
115 static void moveObjects (List<LDObject*> objs, const bool up); // TODO: move this to LDOpenFile? |
116 static str objectListContents (const vector<LDObject*>& objs); // Get a description of a list of LDObjects |
116 static str objectListContents (const List<LDObject*>& objs); // Get a description of a list of LDObjects |
117 static LDObject* fromID (int id); |
117 static LDObject* fromID (int id); |
118 |
118 |
119 // TODO: make these private! |
119 // TODO: make these private! |
120 // OpenGL list for this object |
120 // OpenGL list for this object |
121 uint glLists[4]; |
121 uint glLists[4]; |
280 setLinkPointer (this); |
280 setLinkPointer (this); |
281 } |
281 } |
282 |
282 |
283 // Inlines this subfile. Note that return type is an array of heap-allocated |
283 // Inlines this subfile. Note that return type is an array of heap-allocated |
284 // LDObject-clones, they must be deleted one way or another. |
284 // LDObject-clones, they must be deleted one way or another. |
285 vector<LDObject*> inlineContents (bool deep, bool cache); |
285 List<LDObject*> inlineContents (bool deep, bool cache); |
286 }; |
286 }; |
287 |
287 |
288 // ============================================================================= |
288 // ============================================================================= |
289 // LDLineObject |
289 // LDLineObject |
290 // |
290 // |