src/miscallenous.cc

changeset 768
29e6c5552388
parent 757
8ab9fa53142b
child 784
f82ab4d3c7b4
equal deleted inserted replaced
767:44f0d5322628 768:29e6c5552388
208 case EObjectOrigin: 208 case EObjectOrigin:
209 { 209 {
210 LDBoundingBox box; 210 LDBoundingBox box;
211 211
212 // Calculate center vertex 212 // Calculate center vertex
213 for (LDObject* obj : objs) 213 for (LDObjectPtr obj : objs)
214 { 214 {
215 if (obj->hasMatrix()) 215 if (obj->hasMatrix())
216 box << dynamic_cast<LDMatrixObject*> (obj)->position(); 216 box << obj.dynamicCast<LDMatrixObject>()->position();
217 else 217 else
218 box << obj; 218 box << obj;
219 } 219 }
220 220
221 return box.center(); 221 return box.center();

mercurial