src/misc.cpp

changeset 540
0334789cb4d7
parent 538
2f85d4d286e5
child 541
0e38beeb050a
equal deleted inserted replaced
539:72ad83a67165 540:0334789cb4d7
186 vertex rotPoint (const QList<LDObject*>& objs) 186 vertex rotPoint (const QList<LDObject*>& objs)
187 { LDBoundingBox box; 187 { LDBoundingBox box;
188 188
189 switch (edit_rotpoint) 189 switch (edit_rotpoint)
190 { case ObjectOrigin: 190 { case ObjectOrigin:
191 191 { // Calculate center vertex
192 // Calculate center vertex 192 for (LDObject* obj : objs)
193 for (LDObject * obj : objs)
194 if (obj->hasMatrix()) 193 if (obj->hasMatrix())
195 box << dynamic_cast<LDMatrixObject*> (obj)->position(); 194 box << dynamic_cast<LDMatrixObject*> (obj)->getPosition();
196 else 195 else
197 box << obj; 196 box << obj;
198 197
199 return box.center(); 198 return box.center();
199 }
200 200
201 case WorldOrigin: 201 case WorldOrigin:
202 return g_origin; 202 { return g_origin;
203 }
203 204
204 case CustomPoint: 205 case CustomPoint:
205 return vertex (edit_rotpoint_x, edit_rotpoint_y, edit_rotpoint_z); 206 { return vertex (edit_rotpoint_x, edit_rotpoint_y, edit_rotpoint_z);
207 }
206 } 208 }
207 209
208 return vertex(); 210 return vertex();
209 } 211 }
210 212

mercurial