93 |
93 |
94 // Calculate center vertex |
94 // Calculate center vertex |
95 for (LDObject* obj : objs) |
95 for (LDObject* obj : objs) |
96 { |
96 { |
97 if (obj->hasMatrix()) |
97 if (obj->hasMatrix()) |
|
98 { |
98 box << static_cast<LDMatrixObject*> (obj)->position(); |
99 box << static_cast<LDMatrixObject*> (obj)->position(); |
|
100 } |
99 else |
101 else |
100 box << obj; |
102 { |
|
103 for (int i = 0; i < obj->numVertices(); ++i) |
|
104 box << obj->vertex(i); |
|
105 } |
101 } |
106 } |
102 |
107 |
103 return box.center(); |
108 return box.center(); |
104 } |
109 } |
105 |
110 |