198 { |
198 { |
199 return (one - other).length(); |
199 return (one - other).length(); |
200 } |
200 } |
201 |
201 |
202 /* |
202 /* |
|
203 * Returns a vertex with all coordinates inverted. |
|
204 */ |
|
205 Vertex operator-(const Vertex& vertex) |
|
206 { |
|
207 return {-vertex.x, -vertex.y, -vertex.z}; |
|
208 } |
|
209 |
|
210 /* |
203 * Inserts this vertex into a data stream. This is needed for vertices to be |
211 * Inserts this vertex into a data stream. This is needed for vertices to be |
204 * stored in QSettings. |
212 * stored in QSettings. |
205 */ |
213 */ |
206 QDataStream& operator<<(QDataStream& out, const Vertex& vertex) |
214 QDataStream& operator<<(QDataStream& out, const Vertex& vertex) |
207 { |
215 { |