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 |