src/ldtypes.h

changeset 522
afa691788bdb
parent 516
d3373bc7ca3b
child 538
2f85d4d286e5
equal deleted inserted replaced
521:b85554206155 522:afa691788bdb
94 virtual LDObject* clone() 94 virtual LDObject* clone()
95 { return 0; // Creates a new LDObject identical to this one. 95 { return 0; // Creates a new LDObject identical to this one.
96 } 96 }
97 long getIndex() const; // Index (i.e. line number) of this object 97 long getIndex() const; // Index (i.e. line number) of this object
98 virtual LDObject::Type getType() const; // Type enumerator of this object 98 virtual LDObject::Type getType() const; // Type enumerator of this object
99 const vertex& getVertex (int i) const; // Get a vertex by index 99 const vertex& getVertex (int i) const; // Get a vertex by index
100 virtual bool hasMatrix() const; // Does this object have a matrix and position? (see LDMatrixObject) 100 virtual bool hasMatrix() const; // Does this object have a matrix and position? (see LDMatrixObject)
101 virtual void invert(); // Inverts this object (winding is reversed) 101 virtual void invert(); // Inverts this object (winding is reversed)
102 virtual bool isColored() const; // Is this object colored? 102 virtual bool isColored() const; // Is this object colored?
103 virtual bool isScemantic() const; // Does this object have meaning in the part model? 103 virtual bool isScemantic() const; // Does this object have meaning in the part model?
104 virtual void move (vertex vect); // Moves this object using the given vertex as a movement List 104 virtual void move (vertex vect); // Moves this object using the given vertex as a movement List
105 LDObject* next() const; // Object after this in the current file 105 LDObject* next() const; // Object after this in the current file
106 LDObject* prev() const; // Object prior to this in the current file 106 LDObject* prev() const; // Object prior to this in the current file
107 virtual str raw() 107 virtual str raw() { return ""; } // This object as LDraw code
108 { return ""; // This object as LDraw code
109 }
110 void replace (LDObject* other); // Replace this LDObject with another LDObject. Object is deleted in the process. 108 void replace (LDObject* other); // Replace this LDObject with another LDObject. Object is deleted in the process.
109 void select();
111 void setVertex (int i, const vertex& vert); // Set a vertex to the given value 110 void setVertex (int i, const vertex& vert); // Set a vertex to the given value
112 void setVertexCoord (int i, Axis ax, double value); // Set a single coordinate of a vertex 111 void setVertexCoord (int i, Axis ax, double value); // Set a single coordinate of a vertex
113 void swap (LDObject* other); // Swap this object with another. 112 void swap (LDObject* other); // Swap this object with another.
114 LDObject* topLevelParent(); // What object in the current file ultimately references this? 113 LDObject* topLevelParent(); // What object in the current file ultimately references this?
115 virtual str typeName() const; // Type name of this object 114 virtual str typeName() const; // Type name of this object
116 virtual short vertices() const; // Number of vertices this object has 115 void unselect();
116 virtual short vertices() const; // Number of vertices this object has
117 117
118 static str typeName (LDObject::Type type); // Get type name by enumerator 118 static str typeName (LDObject::Type type); // Get type name by enumerator
119 static LDObject* getDefault (const LDObject::Type type); // Returns a sample object by the given enumerator 119 static LDObject* getDefault (const LDObject::Type type); // Returns a sample object by the given enumerator
120 static void moveObjects (QList<LDObject*> objs, const bool up); // TODO: move this to LDFile? 120 static void moveObjects (QList<LDObject*> objs, const bool up); // TODO: move this to LDFile?
121 static str objectListContents (const QList<LDObject*>& objs); // Get a description of a list of LDObjects 121 static str objectListContents (const QList<LDObject*>& objs); // Get a description of a list of LDObjects

mercurial